[R] means comparison with seasonal time series?
Douglas G. Scofield
d.scofield at umiami.edu
Thu Aug 14 00:28:19 CEST 2003
Dear R list,
I have a sequence of weekly observations of number of adults and larvae
in various size classes from a butterfly population living in a
subtropical area with pronounced wet and dry seasons. Wet and dry
seasons are each defined 26 weeks long with fixed start and end dates.
The data span 103 weeks (two seasons each of wet and dry) with some
missing weeks. What I would like to do is compare means of each type of
observation between wet and dry seasons ("Does the number of adults
observed vary by season?"). Not surprisingly there is pronounced
autocorrelation in the data, e.g.:
dwtest(lm(numadults ~ week))
DW = 0.2727, p-value = < 2.2e-16
Note that the effects of this autocorrelation extend across wet-dry and
What would be a way to ask my questions in R? I'm still learning R (and
statistics) so detailed answers would be most appreciated.
Douglas Scofield Department of Biology
d.scofield at umiami.edu University of Miami
off: (305) 284-3778 P.O. Box 249118
fax: (305) 284-3039 Coral Gables, FL 33124-0421
More information about the R-help