[R-sig-ME] expert opinion on using lmer

Federico Calboli f.calboli at imperial.ac.uk
Thu Jul 19 15:40:54 CEST 2012


> I have the following design, counts were collected at different transects,
> different depths and different sites at different times. Time is continuous
> and assumed to be random, all the others are categorical fixed where
> transect is nested within depth which is nested within site.

I do find the idea that *nested* covariates should be seen as fixed to be odd.  What I would do is to create a NEW covariate for each site/depth/transect combination if I had to consider these covariates as fixed effects.  Secondly, if you are modelling 'counts of something' at time 'whatever' in your sites, I also find it odd that time is the random variable.  Basically, I would see time as fixed and the whole transect business as random.

Hence I would do something like

lmer(count ~ time + (time|a:b:c), family = 'poisson')

to have a random intercept for the nesting variable.

does it help?



> I would like an expert opinion about the following code where intercept is
> modeled as random (I am not sure if this is the right way).
> a<-factor(transect)
> b<-factor(depth)
> c<-factor(site)
> g<-lmer(count~(1|time)+(time|a:b:c), family="poisson")
> Thanks,
> Y
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

Federico C. F. Calboli
Neuroepidemiology and Ageing Research
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com

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