Skip to content
Prev 590 / 7420 Next

mixed model for repeat obs (CL Pressland)

There is only one random effect in the model, site. Year and Week are specified as random slopes. But they are not in the fixed part of the model, hence I don't think this makes sense. Also if butterflies are measured every week, then what does week represent. It can't be a specific random effect as there is no replication within week. 

The question is how to treat time in the model. If there is autocorrelation in time for the residuals then it would make sense to model  this. But lme can only estimate a single common AR parameter across all sites. If there are seasonal patterns then again it would make sense to include this, either using some kind of sine or cosine functions or simply a factor representing the seasons. 

It would clearly make sense to include the other relevant covariates (temp etc) and this might reduce the autocorrelation in the residuals. 

Mike
It gives me a sadistic pleasure that other people have similar
headaches as me.

A few comments:
You can get estimates of the Year, Week and Site effects by extracting
the random effects.

random.effects(model1)

This gives you an idea of the signifcances of random effects. Note
that there are assumptions attached to your random effects in this
kind of analysis.

I noted also that you did not seem to specify a correlation structure
of your random effects which will usually make the estimation of your
fixed effects less reliable since your algorithm
will assume no correlation between random effects (i.e. the number of
butterflies in week 2 is completely independent of the number of
butterflies in week 1 etc....)

Considering that you have a yearly pattern the previous comment that
it would be good to find a time series structure for your data seems
appropiate. (I would, ideally, identify the actual correlation
structure in the time series analysis programs and then introduce them
into the lme). I had often more bad luck than good luck with the approach.

There is another possibility to make the time series analysis for each
series and compare parameters between sites. This is less elegant but
might be easier to get to work. (I applied that approach in a paper by
me in Tree Physiology in 2004).

Note that time series analysis does not support missing or unequally
spaced observations and usually at least 30 observations. Also, time
series requires that your time series are stationary.

Frank
r-sig-ecology-request at r-project.org wrote:
have
have
effect
Also,
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org 
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology