The spectral density at frequency zero is estimated by fitting an
autoregressive model. spectrum0(x)/length(x)
estimates the
variance of mean(x)
.
spectrum0ar(x)
A list with the following values
The predicted value of the spectral density at frequency zero.
The order of the fitted model
Matrix of MCMC chains: the rows are the samples and
the columns are different "parameters". For BART, generally, the
columns are estimates of \(f\). For pbart
, they are
different subjects. For surv.bart
, they are different subjects
at a grid of times.
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. Adapted from the spectrum0.ar
function of
the coda package which passes mcmc
objects as arguments
rather than matrices.
Martyn Plummer, Nicky Best, Kate Cowles and Karen Vines (2006). CODA: Convergence Diagnosis and Output Analysis for MCMC, R News, vol 6, 7-11.
BW Silverman (1986). Density estimation for statistics and data analysis. Chapman and Hall, London.
gewekediag