[R-sig-ME] Fitting CorAR1 in lme with multiple time series

Alessandro Manfrin manfrin at igb-berlin.de
Wed Jan 10 12:20:26 CET 2018

Dear all,
  I have maybe for the "time series" experts a silly question: 
I have a dataset of European rivers =80
In 50% of the rivers I have more than 1 project; in the other 50% is 1 river = 1 project
In 50 % of the projects I have data collected only for 1 year; in the other 50% of the projects data were collected over years (from 2 untill 20 years, depending on the project)
I want to assess the Fish diversity depending on the altitude, latitude, catchment size.

After exploring data for the model assumption of normality, variance heterogeneity etc..I though to run this model: 
mod<-lme(Fish Diversity~log(altitude)+log(latitude)+log(catchment size), random~1|Rivers/Projects, method="ML", data=dati)

When I look at the residuals of model mod and at the acf (residuals(mod) and pacf(residuals(mod), they are pretty good but in acf there is autocorrelation in lag1 
and in pacf the line goes slightly over in lag 3. I think I would give it a try with CorAR1 (p=1) correction in lme:

My questions are:

1- Is the model developed in your opinion correct?

2- Can I fit a correlation CorrAR1 in the lme by just looking at the acf and pacf plots from the model mod? As u see I have different project over time
that means potentially multiple time series (for each project). Can I just fit a unique AR1 structure looking at the residuals of the model (without CorrAR1) 
(and not at the raw data) and assume that the same temporal trend is present in all the projects analysed? How can the acf and pacf know what is the temporal repetion (i.e.
how the acf and pacf biuld the lags in the plots)?

3- if the question number 2 is yes, do I have to organise in the dataframe chronologically 
in the dataset for each project? (e.g. Project1 from 2000 untill 2008; Project 2 from 1998 untill 2015, and so on?) 
as dati[order(dati$Project_names, dati$Year_evaluation), ] and give to the corrAR1 the form structure form = ~1|Rivers/Project_names

Would this model be ok?
modAR<-lme(Abu~log(altitude)+log(latitude)+log(catchment size), random~1|Rivers/Project_names, method="ML",
correlation=corARMA(form = ~1|Rivers/Project_names, p=1)

Thank you for your time


Dr. Alessandro Manfrin

University of Applied Sciences Trier, Umwelt Campus Birkenfeld/
University of Duisburg-Essen, Faculty of Biology

Working place:
Department of Aquatic Ecology
Room S05 T03 B02
Universitätsstr. 5
45141 Essen (DE)
Tel.: +49 (0)201/183-3113
Fax: +49 (0)201/183-2179


	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list