A funcion to estimate a "confidence interval" for the power spectrum and in particular a confidence interval for the dominant period. The function uses resampling of the autoregressive parameters to attain the estimate.
1 2 3 |
x |
A time series without missing values. |
order |
a scalar representing the order
to be considered. If |
resamp |
the number of resamples of the ar-coefficients from the var-covar matrix. |
nfreq |
the number of points at which to save the value for the power spectrum (and confidence envelope). |
echo |
If |
A "confidence interval" for the periodogram is obtained by resampling the ar-coefficients using the variance-covariance matrix from the ar.mle object.
If a zero'th order process is chosen by using the AIC criterion, a first order process will be used.
If the dynamics is highly nonlinear, the parametric estimate of the power spectrum may be inappropriate.
An object of class "specar.ci" is returned consisting of the following components:
order |
the ar-order. |
spectrum$freq |
the spectral frequencies. |
spectrum$spec |
the estimated power-spectrum of the data. |
resamp$spectrum |
gives the quantile summary for the resampling distribution of the spectral powers. |
resamp$maxfreq |
the full vector of output for the resampled max.frequencies. |
Ottar N. Bjornstad onb1@psu.edu
plot.specar.ci
summary.specar.ci
1 2 3 4 5 6 7 8 9 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.