My question is about the basics of linear mixed model and it may be trivial for some of you. Basically, I followed from this tutorial http://www.bodowinter.com/tutorial/bw_LME_tutorial2.pdf on how to do linear mixed effect analyses in R. I am looking for an effect of a genotype on plant growth. I start with $3n$ seeds, $n$ of which have genotype A and other $2n$ have genotype B. I measure the height for each of these seeds by growing them in $n$ trays. Each tray has $1$ seed of genotype A and $2$ seeds of genotype B. So I have a dataframe in R with three columns. First column is plant genotype, second column is tray index and final is observed height. There are $3n$ observations. Following from Bodo Winter's tutorial, I define an alternative model in R as:
alt <- lmer(height ~ genotype + (1+genotype | tray), data=data, REML= FALSE)
I also define a null model:
nul <- lmer(height ~ genotype + (1+genotype | tray), data=data, REML= FALSE)
Then, I compare the results from these two models by doing
I have been interested in following two quantities:
c(coef(summary(alt))[2, "Estimate"], anova(alt, nul)$"Pr(>Chisq)")
My questions are:
What is the underlying matrix formulation that the
nulmodels are solving? I am good with linear algebra but I cannot find any adequately brief or self-contained description just answering my question about my models. All the theory I read is too general and I'd have to read through a lot of stuff to understand it. While I plan to do it, currently I need to finish a project and will feel very comfortable if I could get some insight in what is happening.
anovacomparing the two models to get the p value? Again I could find descriptions on how anova makes use of F-values to estimate significance, I could not relate that description to comparison of two models.
Any explanation will be highly appreciated.