Thank you for the suggestion. There are 2 levels for transect, 3 levels for
depth and 3 levels for site with a total of 2X3X3=18 levels. On top of that
it is unbalanced. In the code you suggested, I don't need to create a new
covariate then.

Thanks,

Y

On Thu, Jul 19, 2012 at 9:40 AM, Federico Calboli
<f.calboli@imperial.ac.uk>wrote:

> THIS IS NOT AN EXPERT OPINION but:
>
> > 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?
>
> BW
>
>
> F
>
>
> >
> > 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@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
>
>

	[[alternative HTML version deleted]]

