[R] Help with short time series

Dieter Menne dieter.menne at menne-biomed.de
Mon Aug 7 11:53:11 CEST 2006


Simone Vincenzi <simone.vincenzi <at> nemo.unipr.it> writes:

> 
> Dear R-list, 
> I have a statistical problem with the comparison of two short time-series of 
> density data in an ecological framework. I have to compare two short time 
> series (5 years, one value for each year) of species density data (it is the 
> density of fish in two different streams) to test if the two means of the 
> five densities are significantly different, so basically if the two mean 
> stream-specific fish densities are significantly different. 
> I don't think I can use a straight t-test due to the problem of 
> autocorrelation and I don't think I can use a repeated measure ANOVA as I 
> don't have any replicates. 
> Any help would be greatly appreciated. 

try something like 

library(nlme)
summary(lme(dens~stream+year,data=mystreamdata,random=~year|stream))

This should also give you an estimate if the slopes are different if you test
against the simplified model

summary(lme(dens~stream+year,data=mystreamdata,random=~1|stream))

Since you did not provide a short example data set, this is only approximatively
right.

Dieter



More information about the R-help mailing list