[R] Nested design

Spencer Graves spencer.graves at pdf.com
Sun May 21 17:34:42 CEST 2006

<see inline>

Giovanni Bacaro wrote:
> Dear list members,
> I'd like to perform a glm analysis with a hierarchically nested design. In
> particular,
> I have one fixed factor ("Land Use Classes") with three levels and a random
> factor ("quadrat") nested within Land Use Classes with different levels per
> classes (class artificial = 1 quadrat; class crops = 67 quadrats; and class
> seminatural = 30 quadrats).
> I have four replicates per each quadrats (response variable = species
> richness per plot)
> Here some question about: 
> 1) could I analize these data using the class "artificial" (i.e. I have only
> 1 level)?

SG:  I don't know for sure, but I don't think it would be a problem.  I
wouldn't be afraid to try.
> 2) using R I'd like perfor a glm analysis considering my response variable
> (count of species) with a Poisson distribution. How can I develop my model
> considering the nested nature of my design? I'm sorry but I don't know the
> right package to use.
SG:  There are several functions for "generalized linear mixed models",
but I think the best is 'lmer' with the 'lme4' and 'matrix' packages.  For
documentation, I recommend the "MlmSoftRev" vignette in the "mlmRev" 
plus the article by Doug Bates in a recent issue of "R News" on this 
subject.  Vignettes are particularly powerful, because you get both an 
Adobe Acrobat *.PDF file and a companion script file that you can work 
through line by line.  To see how to do this, I suggest you try 
something like RSiteSearch("vignette edit") [or RSiteSearch("vignette 
emacs") if you use (X)Emacs].  To find the suggested Bates article, try 
"www.r-project.org" -> "Documentation:  Newsletter", then download and 
search the table of contents.
> 3) for the Anova analysis I'd like use a post-hoc comparison between
> pairwise classes. What is the right procedure to do this? Is this analysis
> performed in R?

SG:  Try RSiteSearch("post-hoc comparisons").
> Thanks 
> Giovanni  
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list