[R-sig-ME] Temporal Autocorrelation
katie.murray at stir.ac.uk
Wed Jan 27 16:02:15 CET 2016
I was wondering if anyone would be able to give me some guidance with the following:
We have a dataset that investigates the senescence of insect body weight. Observations span several months with measurements of weight taken for individuals on a weekly basis until they die. Each individual has a unique ID; every week we collected weight data and measured some other parameters. We would like to test for and account for temporal autocorrelation in the data set.
We are trying to run a model in lme of this form:
m1<-lme(weight ~ week + var 1 + var 2, random = ~ 1 + week_checked|ID,
correlation = corAR1(form = ~ 1 + week_checked|ID),
data = data)
lme delivers the following error message:
"Error in Initialize.corAR1(X[[i]], ...) :
covariate must have unique values within groups for "corAR1" objects "
We believe this is caused by the fact that individuals disappear from the dataset as they die, and therefore their ID is no longer represented in the weeks following death. If we truncate the data set before the first individual dies, the model runs fine.
Is there any way to account for temporal autocorrelation in a data set where the number of individuals progressively declines over time due to mortality?
Many thanks in advance,
PhD Research Student
Biological and Environmental Sciences
Katie.murray at stir.ac.uk
The University is ranked in the QS World Rankings of the top 5% of universities in the world (QS World University Rankings, 2014)
The University of Stirling is a charity registered in Scotland,
number SC 011159.
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models