[R-sig-ME] how to look at the effect of a variable I need to control for
Andrew Miles
rstuff.miles at gmail.com
Fri Nov 18 17:50:36 CET 2011
I believe that if you include all the census years as dummy variables
in the fixed effects part of the model (minus one for the reference
category), that should eliminate the need to include the census years
as a random effect since you are incorporating all of the temporal
information into the model, and thereby controlling for it. You can
still use random effects to control for any other sort of dependency,
such as between samples from the same tree.
Someone with greater statistical knowledge than I have may wish to
weigh in on this as well.
Andrew Miles
On Nov 18, 2011, at 11:13 AM, glenda mendieta wrote:
> Dear list members:
>
> a while ago I made a consultation about the use of GLMM's that can
> be found here:
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2011q4/006873.html
> I know there is a lot going on in the list for every consultation to
> be answered, but, this time I have "simpler" question:
>
> I have a doubt concerning a factor I want to see the effect from,
> but I also need to control for.
> My data consists on:
> 5 *census* in 10 years, each time we inspect for abundance of
> species (*spp*) occurring on different individuals of a unique
> species of *tree* (plots).
> -census: 5 levels, as Fixed effect, since I want to see the effect
> of time in the change of pres.abs or abundance of species
> -trees: ~89 to 113, each individual tree inspected, as Ran.Eff.,
> since I hoped to control for temporal correlation, as we revise the
> same trees every census
> -spp: 89, number per species of epiphytes growing on the trees
> -abs.pres: absence presence data of species growing on trees per
> census (derived form count data), as ResVar
> -avail.surface: surface in m2 per tree per census, as FE
>
> in the following model, and with the above mentioned data, I would
> like to test for the effect of time and surface availability on
> colonization (absence/presence). My problem is that I don't know how
> to combine the fact that the data are temporally correlated and
> control for that but still look at the effect of time in absence and
> presence of species.
> I tried placing time as a centered continuous variable as fixed
> effect "c.census", and then again, as random effect, but as a factor
> in (census|tree) or would be enough as: (1|tree), since the trees
> are the ones being inspected every time?
>
> glmm.all<-glmer(abs.pres~c.census*avail.surface+ (census|tree),
> data=db.e_St, family=binomial(link=logit))
>
> I would very much appreciate a hint on this since I got stuck with
> it and can not seem to find my way around it.
>
> thank you very much for your time in advance,
>
> glenda mendieta-leiva
> PhD candidate
> University of Oldenburg, Germany
> Smithsonian Tropical research institute
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list