spec.ar {ts} | R Documentation |
Estimate Spectral Density of a Time Series from AR Fit
Description
Fits an AR model to x
(or uses the existing fit) and computes
(and by default plots) the spectral density of the fitted model.
Usage
spec.ar(x, n.freq, order = NULL, plot = TRUE, na.action,
method = "yule-walker", ...)
Arguments
x |
A univariate (not yet:or multivariate) time series or the
result of a fit by |
n.freq |
The number of points at which to plot. |
order |
The order of the AR model to be fitted. If omitted, the order is chosen by AIC. |
plot |
Plot the periodogram? |
na.action |
NA action function. |
method |
|
... |
Graphical arguments passed to |
Value
An object of class spec
.
The result is returned invisibly if plot
is true.
Warning
Some authors, for example Thomson (1990), warn strongly that AR spectra can be misleading.
Note
The multivariate case is not yet implemented.
Author(s)
B.D. Ripley
References
Thompson, D.J. (1990) Time series analysis of Holocene climate data. Phil. Trans. Roy. Soc. A 330, 601–616.
Venables, W.N. and Ripley, B.D. (1997) Modern Applied Statistics with S-PLUS. Second edition. Springer. (Especially p. 448.)
See Also
ar
, spectrum
.
Examples
data(lh)
spec.ar(lh)
data(UKLungDeaths)
spec.ar(ldeaths)
spec.ar(ldeaths, method="burg")