[R-sig-ME] Unevely-spaced time dependency in a multiple-river dataset
Alessandro Manfrin
manfrin at igb-berlin.de
Wed Jan 3 16:57:16 CET 2018
Dear all,
I am writing you because you might be able to answer to some questions that I am trying to answer myself since few months (unfortunately without great success).
Briefly:
-I am working with a large dataset of more then 300 Restoration Projects in 80 rivers in 4 countries Germany, France, Finland and Switzerland.
-Fish where collected in each site in a restored (i.e. removal of dams, restoration of the river bed, and so on) and in unrestored condition (i.e. no changes)
->The main aim of the study is to analyse changes in the fish diversity index ratio (as delta (Unrestored-Restored)/Unrestored) over several years (that I grouped in categories to deal with data linearity (a=0-2 years after restoration; b =3-5 years after; c= and so on up to 20 years)
However, I believe I have to correct for the fact that I have temporally dependent data. Furthermore, in each river data were collected
not-uniformly: in some rivers fish were collected for 21 years every year, in other rivers data were collected only for 10 years and in others only 1 year (unevenly spaced time series?)
so I though to include a weights correction in the model inversely proportional to the observations.
I thougt to perform in R a mixed effect model as:
lmer (delta Fish diversity (as Impact-Control)/Control)~as.factor(Years from restoration)*Countries, random factor = Restoration Project, weights=1/observations)
I have few questions:
1-Is the weights option used correctly in the above model? (or should be weights=observations??, I read some differences between lme and lmer in the use of weights option)
2-From the analysis of the residuals it looks like there is a trend in my data (see plots)
I do not know how to deal with it. Maybe CorrAR() option in lme? But how can I correct for that as I have different Restoration
Projects (random factor)? Do I have to run a single model for each project (as unique time series?). The main aim is to try to show a general pattern, therefore I would like to use all the project together.
Hoping in some good suggestions I thank you for your consideration.
Best wishes
Alessandro
More information about the R-sig-mixed-models
mailing list