Marco Leandro Carmosino
2008-Aug-20 08:41 UTC
[R] Time Series w/irregular frequency, how to construct a time series object?
Hello, I am having trouble constructing a time series object for my data. This is because the frequency is irregular: one year, there may be only 100 individuals, another 200. There are 100 measurements for every individual. I have the observations in a data frame with the year that they were taken from as a factor. I would like to plot the top 10 mean measurements for each year and connect them with a line, to measurements in the same category. I would also like to try using linear filtering and exponential smoothing on the measurements to look for patterns, in particular synchronized drastic changes in measurement values. Are all the time-series analysis functions inappropriate because of the irregular frequency in my data? I looked at the reference manual, and it seems that even building the tsp attribute manually would require providing a frequency argument. It's quite possible that I have some very wrong ideas about time series analysis, as I am just beginning to study the subject. Thanks for any help, --Marco
Gabor Grothendieck
2008-Aug-20 12:29 UTC
[R] Time Series w/irregular frequency, how to construct a time series object?
The zoo package can represent irregular time series. On Wed, Aug 20, 2008 at 4:41 AM, Marco Leandro Carmosino <malc07 at hampshire.edu> wrote:> Hello, > > I am having trouble constructing a time series object for my data. This is > because the frequency is irregular: one year, there may be only 100 > individuals, another 200. There are 100 measurements for every individual. I > have the observations in a data frame with the year that they were taken from > as a factor. > > I would like to plot the top 10 mean measurements for each year and connect them > with a line, to measurements in the same category. I would also like to try > using linear filtering and exponential smoothing on the measurements to look > for patterns, in particular synchronized drastic changes in measurement values. > > Are all the time-series analysis functions inappropriate because of the > irregular frequency in my data? I looked at the reference manual, and it seems > that even building the tsp attribute manually would require providing a > frequency argument. It's quite possible that I have some very wrong ideas about > time series analysis, as I am just beginning to study the subject. > > Thanks for any help, > > --Marco > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >