[R] Time Series
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Mar 16 20:28:47 CET 2005
On Wed, 16 Mar 2005 consentino at infinito.it wrote:
> I'm using a dataset with unequally spaced time series
> and I'd want to know if there is in R some function in
> order to calculate the autocorrelation function, because
> acf() in stats package cannot calculate it, because I
> have many missing data, and data are not equally spaced.
The autocorrelation function is a theoretical quantity: acf() estimates
it, not calculates it. (Do read its help page carefully.)
For `unequally spaced time series' you would need to define what you mean
by the autocorrelation function, then find a credible estimator.
(One way forward is to assume you have a sample of a continuous-time
series, but only one.)
> And if so, is it necessary to organize dataset in ts
> structure or is it possible to consider it like a simple
> vector?
None of the above!
Depends what you want to do with it, but the structures offered by the
packages tseries, zoo and its seem more suitable.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list