Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

spectrum0.ar

Estimate spectral density at zero


Description

The spectral density at frequency zero is estimated by fitting an autoregressive model. spectrum0(x)/length(x) estimates the variance of mean(x).

Usage

spectrum0.ar(x)

Arguments

x

A time series.

Details

The ar() function to fit an autoregressive model to the time series x. For multivariate time series, separate models are fitted for each column. The value of the spectral density at zero is then given by a well-known formula.

Value

A list with the following values

spec

The predicted value of the spectral density at frequency zero.

order

The order of the fitted model

Note

The definition of the spectral density used here differs from that used by spec.pgram. We consider the frequency range to be between 0 and 0.5, not between 0 and frequency(x)/2.

See Also


coda

Output Analysis and Diagnostics for MCMC

v0.19-4
GPL (>= 2)
Authors
Martyn Plummer [aut, cre, trl], Nicky Best [aut], Kate Cowles [aut], Karen Vines [aut], Deepayan Sarkar [aut], Douglas Bates [aut], Russell Almond [aut], Arni Magnusson [aut]
Initial release
2020-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.