Learn R Programming

nlts (version 0.2-0)

specar.ci: Confidence interval for the ar-spectrum and the dominant period.

Description

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.

Usage

specar.ci(x, order, resamp = 500, nfreq = 100, echo = TRUE)

Arguments

x

A time series without missing values.

order

a scalar representing the order to be considered. If "aic" the orderis be selected automatically using the AIC criterion.

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 TRUE, a counter for each nrun shows the progress.

Value

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.

Details

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.

See Also

plot.specar.ci summary.specar.ci

Examples

Run this code
# NOT RUN {
   data(plodia)


    fit <- specar.ci(sqrt(plodia), order=3, resamp=10) 

    
# }
# NOT RUN {
plot.specar.ci(fit, period=FALSE)
# }
# NOT RUN {
    summary.specar.ci(fit)
 
# }

Run the code above in your browser using DataLab