[R-sig-ME] models with fixed effets nested in random effects

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Sat Mar 3 21:26:24 CET 2007


Hi Wayne,

your question points to a broader problem with the specification of
fixed and random effects.  It is often true that fixed effects are
aliased with elements of the underlying experimental design - such as
in split plot designs - and then it makes sense to declare the effect
as both fixed and random.  (Actually I think that it makes more sense
to create a new variable identical to the first and use one for fixed
and the other for random, but that is neither here nor there.)  I'm
not sure whether this is true in your case.

Anyway, I'm confused that you write "The treatment was applied:
Location/Subsite/TREATMENT/year" and then in your model statement you
have only three levels: FenceEnd/FEsection/MIT_UNMIT. Also, it seems
that two treatment effects appear in the random statement.  I can't
reconcile that with your earlier description.  Can you try to clarify
these - perhaps by giving a more complete description of the design?

Cheers,

Andrew



On Fri, Mar 02, 2007 at 11:44:01AM -0700, Hallstrom, Wayne (Calgary) wrote:
> I am having trouble defining a model that accounts for the data
> structure but also allows the treatment effect to be estimated as a
> fixed effect. I think I have it figured out but I would like to see what
> some other opinions are regarding placement of a fixed effect in both
> the random and fixed sections of a model formula.
>  
> There is 20 years of records at a variety of locations and subsites
> within each location, with treatments for 1/2 of the years of records at
> each location and subsite. The general structure to the data is:
>     Location/Subsite/year
> The treatment was applied:
>     Location/Subsite/TREATMENT/year
>  
> The model format is:
>     u5 <- lmer(ung ~ FEsection + MIT_UNMIT +
> (1|FenceEnd/FEsection/MIT_UNMIT), family=quasipoisson(link =
> 
>         "log"))
> 
>  
> 
> Model output is:
> 
>     > summary(u5)
> 
>     Generalized linear mixed model fit using Laplace 
> 
>     Formula: ung ~ FEsection + MIT_UNMIT + (1 |
> FenceEnd/FEsection/MIT_UNMIT) 
> 
>      Family: quasipoisson(log link)
> 
>       AIC  BIC logLik deviance
> 
>      1661 1733 -816.7     1633
> 
>     Random effects:
> 
>      Groups                         Name        Variance Std.Dev.
> 
>      MIT_UNMIT:(FEsection:FenceEnd) (Intercept) 0.268713 0.51838 
> 
>      FEsection:FenceEnd             (Intercept) 0.066643 0.25815 
> 
>      FenceEnd                       (Intercept) 0.213373 0.46192 
> 
>      Residual                                   1.371364 1.17105 
> 
>     number of obs: 1230, groups: MIT_UNMIT:(FEsection:FenceEnd), 93;
> FEsection:FenceEnd, 58; FenceEnd, 7
> 
>      
> 
>     Fixed effects:
> 
>                     Estimate Std. Error t value
> 
>     (Intercept)    -1.808774   0.340329  -5.315
> 
>     FEsection2     -0.148425   0.349608  -0.425
> 
>     FEsection3     -0.066525   0.344542  -0.193
> 
>     FEsection4     -0.021216   0.346025  -0.061
> 
>     FEsection5      0.470120   0.333193   1.411
> 
>     FEsection6      0.459920   0.329556   1.396
> 
>     FEsection7      0.455736   0.381993   1.193
> 
>     FEsection8      0.006034   0.399353   0.015
> 
>     FEsection9      0.423509   0.383930   1.103
> 
>     FEsection10     0.062848   0.393176   0.160
> 
>     MIT_UNMITunmit  1.572822   0.188382   8.349
> 
>  
> 
> This seems fine to me, there are the propoer number of groups in the
> data structure. The problem I have yet to wrap my head around is the
> fact that the fixed effects are still in the random effects category as
> well. Is that a problem? Should I be adding all terms with fixed effect
> variable, including interaction terms, into the 'fixed effects' part of
> the model equation? Since I am new to this LMER routine it is a bit
> confusing to write.
>  
> Wayne Hallstrom
> *** WORLEYPARSONS GROUP NOTICE ***
> "This email is confidential.  If you are not the intended recipient, you must not disclose  or  use the  information  contained in it.  If you have received this email in error,  please notify us immediately by return email and delete the email and any attachments. Any personal views or opinions expressed by the writer may not necessarily reflect the views or opinions of any company in the WorleyParsons Group of Companies."
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

-- 
Andrew Robinson  
Department of Mathematics and Statistics            Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/




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