[R] Hierarchical glm

Pascal A. Niklaus Pascal.Niklaus at unibas.ch
Thu Nov 6 17:48:52 CET 2003


Hi all,

I'm not sure how to correctly analyse the following data with glm, and 
hope for some advice from this list, ideally showing how to specify the 
model in R and perform the tests, and also for suggestions of literature.

The data structure is like this:

   - 20 plant populations were investigated (random factor pop), which 
belong to different habitat types (factor ht)
   - Within each plant population, individuals were grouped into 3 size 
classes (factor sz)
   - For each individual, some count data were recorded

The independent variables I'd like to analyse are either poission of 
binomially distributed.

For gaussian data, I would use the following model:

   ht + pop %in% ht + sz + sz:ht + sz : pop %in %ht

ht would basically be tested against pop (because the population is the 
unit of replication for ht), and sz against sz:pop:ht. (the hypotheses 
to test are that ht has an effect, and whether the effect of sz on 
individuals of a population depends on ht)

However, I do not know how to translate this to the deviance analysis 
case. For example, when I fit the whole model, and then drop ht to test 
for the effect of ht, the effect of ht shows up in pop (I understand 
why, but don't know how to do this otherwise). If I compare the null 
model to the model including ht only, do I then commit a pseudoreplication?

Thanks for your help

Pascal




More information about the R-help mailing list