[R-sig-ME] Help with Linear Model
Phillip Alday
Phillip.Alday at unisa.edu.au
Fri Nov 4 06:38:51 CET 2016
One possible model would be:
Yield ~ nitrogen*variety*Year + (Year|Site:block)
You won't explicitly model the variation between sites, but you should still capture at least some of it via the Site:block interaction. (If your blocks are labelled uniquely across sites, then you can just use block instead of Site:block). You have a total of 8 levels for blocks, which still isn't a lot but should work.
You could also include a fixed effect for Site:
Yield ~ nitrogen*variety*Year*Site + (Year|Site:block)
but this will add a fair amount of complexity to the model and I'm not sure you have enough data for that.
I'm not familiar with oat yields, so I don't know if you should transform Yield, the example in the oats dataset (?oats in R) don't transform Yield.
Best,
Phillip
> On 4 Nov 2016, at 15:58, Joseph Aidoo <jaidoo at ualberta.ca> wrote:
>
> Thank you Philip for your quick response. I am treating Year as a factor.
>
> I am not interested in the year effect. However I wish to account for it.
> At each site we had four blocks for the experiment so I assumed blocks will be in sites.
> Given this clarification how would have out my model?
>
> I have read some papers which combines site*years = environment. I don't know if its suitable in this experiment.
>
> Thank you
>
>
> On Thu, Nov 3, 2016 at 11:06 PM, Phillip Alday <Phillip.Alday at unisa.edu.au> wrote:
> Hi Joseph,
>
> Are you treating year as a continuous variable or a categorical? If you only have three years and one is outlier-isn, it may not make sense to treat them as a continuous variable (whether linear, quadratic or some other form).
>
> Also, 2 sites is not enough levels for a random effect -- remember that RE are variance estimates and it doesn't really make sense to make a variance estimate of two levels. How many blocks do you have per site? Maybe Site:block is sufficient and if need be you can include Site as a nuisance parameter in the fixed effects?
>
> Best,
> Phillip
>
> > On 3 Nov 2016, at 05:07, Joseph Aidoo <jaidoo at ualberta.ca> wrote:
> >
> > My experiment was set up as a RCBD with
> > 5 oat varieties
> > 4 nitrogen rates
> > at 2 sites
> > over 3 years .
> >
> > I am investigating the effect of Variety and Nitrogen on Yield.
> >
> > In the second year of the experiment we had a drought so the data was
> > awful. So i expect differences in Years
> >
> > I am using Variety, Nitrogen and Year as my fixed effects.
> > and Sites as my random effect.
> >
> > I expect and interaction between Variety X Nitrogen.
> > This is the model i came up with
> >
> > Yield ~ nitrogen*variety*Year + (Year|Site/block)
> >
> > My data doesnt seem normal because of the odd year with the drought.
> > I have tried to normally transform the data but nothing seems to work.
> >
> > I need advice on what to do next? Is it ideal to use a glmm? What could the
> > best model be?
> >
> > Thanks
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
More information about the R-sig-mixed-models
mailing list