[R-sig-eco] mixed model for repeat obs

Peter Solymos solymos at ualberta.ca
Tue Mar 24 18:09:18 CET 2009


Hi Kate,

You can use time series analysis (ar, arima functions at first)
instead, because YEAR and WEEK clearly has structure (i.e.
observations are conditional on previous observations with some lag).
To control for SITE, you can use polynomials of the geographical
coordinates (or write a hierarchical space-time series model say in
WinBUGS). Anyway, you should decide what are your parameters of
interest, and what you consider as nuisance parameters, and formulate
the model accordingly.

Cheers,

Péter

Péter Sólymos, PhD
Postdoctoral Fellow
Department of Mathematical and Statistical Sciences
University of Alberta
Edmonton, Alberta, T6G 2G1
Canada
email <- paste("solymos", "ualberta.ca", sep = "@")



On Tue, Mar 24, 2009 at 9:35 AM, CL Pressland
<Kate.Pressland at bristol.ac.uk> wrote:
> I have a data set that is unbalanced and consists of:
>
> 67 SITEs measured over several YEARs every WEEK for butterflies (LEPS per
> m). I'm interested in the MANagement code assigned to each site, but I have
> also data on TEMPerature, average SUN and WIND. My guess is that a linear
> mixed model would be most appropriate and have constructed this code:
>
> model1<-lme(LEPS~MAN,random=~YEAR/WEEK|SITE)
>
> The output gives me:
> --------------------------------------------------------------------
> Linear mixed-effects model fit by REML
> Data: NULL
>       AIC       BIC   logLik
>  -37631.24 -37566.48 18824.62
>
> Random effects:
> Formula: ~YEAR/WEEK| SITE
> Structure: General positive-definite, Log-Cholesky parametrization
>                 StdDev       Corr
> (Intercept)     5.875102e-03 (Intr) YEAR
> YEAR            1.392439e-06 -0.164
> YEAR:WEEK               5.068196e-07  0.531  0.301
> Residual        3.532589e-02
>
> Fixed effects: LEPS ~ MAN
>                 Value   Std.Error   DF  t-value p-value
> (Intercept) 0.009866718 0.001428957 9793 6.904841    0.00
> MAN             0.000028304 0.001127429   65 0.025105    0.98
> Correlation:
>       (Intr)
> MAN -0.685
>
> Standardized Within-Group Residuals:
>       Min          Q1         Med          Q3         Max
> -2.70566579 -0.40089121 -0.18073723  0.05900735 19.16411466
>
> Number of Observations: 9860
> Number of Groups: 67
> --------------------------------------------------------------------
>
> This output confuses me greatly! I figure that this clearly means that
> management has no effect on butterflies but how can I figure out what effect
> SITE, YEAR and WEEK have on the data? Would I have to also include them in
> the fixed effects side of the formula (I'm unsure if this is allowed)? Also,
> how could I include my weather variables? Would they just be placed on the
> fixed effect side of the formula? If they are correlated (I expect the
> weather variables are) would I have to place them in an interaction rather
> than separately?
>
> Any help that would be given would be gratefully received!
>
> Kate
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>



More information about the R-sig-ecology mailing list