awade
2008-Mar-28 02:13 UTC
[R] Estimating variance components of groups of covariates within regression model
I am interested in estimating the variance components from different groups of variables in a linear regression. For example, I want to model dependent variable ?Y? based on six covariates as follows: (these are land use types measured at three scales for each Y, "Local", "Riparian", and "Catchment" - these are not nested as there is a unique area for each Y - and Y is a measure of stream health) L_F=c(3.36,-0.5,-0.91,1.55,-0.02,-0.91,-0.91,-0.91,-0.07,1.69) L_W =c(-0.3,-0.3,-0.3,4.55,3.2,-0.3,-0.3,-0.3,8.55,-0.3) R_A = c(-1.4,-1.06,-1.43,-1.72,-0.78,-1.72,-1.72,-1.72,-0.74,-1.32) R_W = c(-0.77,0.62,0.1,-0.77,2.85,-0.77,-0.77,-0.77,2.27,-0.45) C_U = c(-0.19,-0.2,1.88,2.41,0.11,2.33,2.38,2.5,0.2,1.99) C_F = c(2.86,3.11,-0.72,-0.9,2.09,-0.92,-0.85,-1.2,1.57,-0.52) Y = c(1.4,2.75,1.4,1.94,2.11,2.44,1.94,1,2.11,1.4) model = lm(Y ~ L_F + L_W + R_A + R_W + C_U + C_F) I want to identify how much of the variance is attributable to L, R, and C - three groups each having two covariates in the model. While I find several examples that apply lmer, aov, or CorVarr functions to estimate variance components, I don't see how to apply these to my design. I both don't see how to block my data so that I can run aov, nor do I see how to do so from within the linear regression model, as other examples (that I find) are purely repeat measures or specifically nested. A side question is, if eventually the answer relies on correct blocking, how do I handle the issue if group "L" has 2 covariates, but group "R" has 3, as blocking with gl() won't allow this? Thanks for any and all suggestions. I'm happy to be pointed to some examples that fit my model - I may be searching the wrong keywords. Thanks again, Alisa Wade Department of Geosciences Colorado State University