extracting variance components from lm (Lee, Laura)
To quote the Statsoft Electronic Textbook (Stats), “The basic goal of variance component estimation is to estimate the population covariation between random factors and the dependent variable.”
In using “lm,” you are assuming Station and Year are fixed factors. Therefore, the only random component is the residual error term.
To estimate variance components, you must assume either Year or Station is fixed & the other factor random (= mixed model analysis), or that both Year & Station are random. You will need to use nlme/lmm for the mixed or random analyses.
Also, re. your R code for the LM, it should be either Year * Station, or Year + Station + Year:Station.
See The R Book, 2nd ed., Michael J. Crawley, Chap. 19 – Mixed-Effect Models, for some examples.
m1 <- lm(Catch ~ Year + Station + Year*Station, data = data)
I would like to extract the among years and year*station variance components and need assistance. I'm aware of the 'varComp' package, but I believe that only applies to nlme and requires a random effect. Any help is greatly appreciated. Thanks!
Laura M. Lee
Senior Stock Assessment Scientist
Division of Marine Fisheries
Department of Environmental Quality