[R] replicated time series - lme?

Katrin Meyer meykatrin at gmx.de
Sat Mar 4 14:45:46 CET 2006


Dear R-helpers,

I have a time series analysis problem in R:

I want to analyse the output of my simulation model which is proportional
cover of shrubs in a savanna plot for each of 500 successive years. I have
run the model (which includes stochasticity, especially in the initial
conditions) 17 times generating 17 time series of shrub cover. 

I am interested in a possible periodicity of shrub cover (the time lag(s) of
significant autocorrelation) and would like to include the information from
the 17 replicate simulations. 

>From the acf and pacf plots, I can assume that time lags of up to 150 years
are relevant. I tried  a mixed effects model as following:

#short example version of input file with 2 runs and 5 time steps (instead
of 17 runs and 500 time steps)
run	t	cover
1	1	0.234306
1	2	0.188896
1	3	0.198193
1	4	0.213959
1	5	0.184952
2	1	0.189316
2	2	0.185631
2	3	0.20211
2	4	0.216064
2	5	0.216064

#calculate the correlation of lag 1 over 17 replicates
a<-0
for (i in 1:17)
{
c<-ts( cover[run==i] )
d<-acf( c, lag=1, plot=F)
a<-a+d$acf[2]
}
a<-a/17
a
#[1] 0.9021463

#mixed effects model
model1<-lme(cover~t,random=~t|run, method="ML")
model2<-update(model1,correlation=corCAR1(0.902,form=~t|run))
anova(model1,model2)

But this just gives significance for a lag of 1, so I tried to find out the
correlation at greater lags with arima to be able to use corARMA() as
correlation structure:

arima(cover[run==1],order=c(100,0,0)) 
#does not work: “error in polyroot(z): polynomial degree too high”

Any ideas to solve this? Maybe, I don’t even need a mixed effects model?

I would be very grateful for any help
Katrin

-- 
Katrin Meyer
Institute of Ecology
Friedrich-Schiller-University
Dornburger Str. 159
D- 07743 Jena
Germany



"Feel free" mit GMX FreeMail!
Monat für Monat 10 FreeSMS inklusive! http://www.gmx.net




More information about the R-help mailing list