[R-sig-ME] interaction and nested notation in lmer

Mashitah Jusoh mashitahj at gmail.com
Tue Sep 22 00:24:25 CEST 2015


Hi,

I would like to ask about the notation to indicated nested and interaction
when using lmer function.

Here is my experiment look like:

I have 95 genotypes with 2 replications that were conducted in two years.
Some of the observation were missing, making the dataset unbalance. So, I
decided to use lmer function to fit the data to get the variance component
and will treat all components as random. The model that I am going to fit
is:

Y=mean + year + genotype + rep (nested in year)  + genotype*year + error

I am wondering how to write the command for nested and interaction term in
R using lmer function for this model? As far as I search in the internet,
the command for nested and interaction seems like using similar notation,
for example (1|year:rep) to show rep is nested within year (for random
effect) the same notation is used to indicate the interaction (for other
variables, such as genotype:year). Correct me if i am wrong. And, can you
give some clarification about this and also how lmer/ R works with
interaction and nested data?

Thank you

-- 
Mashitah Jusoh
Graduate Student
Department of Horticulture
UW-Madison

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list