[R-sig-ME] Question on lmer use and commands
Ken Beath
kjbeath at kagi.com
Tue Jun 10 12:42:09 CEST 2008
On 10/06/2008, at 7:35 AM, Peter S Coates wrote:
> To R users,
>
> I am new to R and would appreciate any suggestions to my questions.
> I am
> modeling factors that influence point counts. My question is
> regarding the
> use and command lines of lmer. First, I have repeated measures per
> site
> (10-20 per site), multiple years, and multiple spatial scales of each
> factor. The counts by day are different within each site but the
> explanatory data are the same and therefore do not vary (e.g., %
> cover). I
> have few sites with no overlap, even at the largest scales. I
> followed an
> example of mixed model use with longitudinal data from Faraway 2005
> and
> modeled site and year as random effects. Example of my formula was:
> log(response) ~ hab1 + hab2 + (1 | year) + (1 | site). The models
> converged, no warnings, etc. Was this an appropriate model for these
> data?
> Also, do you suggest including a time component (e.g., timing of
> surveys
> partitioned into grouped days) , even though I am not necessarily
> interested in timing effects? If so, is it correct to model it as
> (time|site) instead of (1|time) and does time need to be additionally
> included as a fixed effect? Thank you very much for suggestions.
>
You haven't fully described your model. Usually for this data it would
be either a Poisson or overdispersed Poisson, set using the family
parameter, then the log transform of the response isn't required.
I would also be worried about the relatively small value of the hab2
parameter estimate. This usually means that something is setup
wrongly. Including the commands used and a few lines of data helps.
Ken
> Models and output are:
>
> Without including time (date of survey):
>
> r mixed-effects model fit by REML
> Formula: log(response) ~ hab1 + hab2 + (1 | year) + (1 | site)
> Data: data
> AIC BIC logLik MLdeviance REMLdeviance
> 177 192.1 -83.5 148.1 167
> Random effects:
> Groups Name Variance Std.Dev.
> site (Intercept) 0.1378352 0.371262
> year (Intercept) 0.0023579 0.048558
> Residual 0.1180495 0.343583
>
>
> Fixed effects:
> Estimate Std. Error t value
> (Intercept) 8.666e+00 1.031e+00 8.402
> hab1 -4.213e+00 1.194e+00 -3.527
> hab2 -3.100e-05 4.463e-05 -0.695
>
> Correlation of Fixed Effects:
> (Intr) hab1
> hab1 -0.992
> hab2 -0.229 0.149
>
> With time (no time fixed effect):
>
> r mixed-effects model fit by REML
> Formula: log(response) ~ hab1 + hab2 + (1 | year) + (time | site)
> Data: data
> AIC BIC logLik MLdeviance REMLdeviance
> 168.1 189.2 -77.07 134.9 154.1
> Random effects:
> Groups Name Variance Std.Dev. Corr
> site (Intercept) 0.16295061 0.403671
> time 0.02118839 0.145562 -0.523
> year (Intercept) 0.00055594 0.023578
> Residual 0.09299733 0.304955
>
>
> Fixed effects:
> Estimate Std. Error t value
> (Intercept) 8.079e+00 1.006e+00 8.028
> hab1 -3.643e+00 1.162e+00 -3.136
> hab2 -2.391e-05 4.331e-05 -0.552
>
> Correlation of Fixed Effects:
> (Intr) hab1
> hab1 -0.993
> hab2 -0.243 0.163
> [[alternative HTML version deleted]]
>
> _______________________________________________
> 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