adaptspec: Adaptive Spectral Estimation for Non-stationary Time Series

Description Usage Arguments Value Author(s) References Examples

Description

Methodology for analyzing possibly non-stationary time series by adaptively dividing the time series into an unknown but finite number of segments and estimating the corresponding local spectra by smoothing splines.

Usage

1
2
3
4
adaptspec(nloop, nwarmup, nexp_max, x,
   tmin, sigmasqalpha, tau_prior_a, tau_prior_b,
   tau_up_limit, prob_mm1, step_size_max,
   var_inflate, nbasis, nfreq_hat, plotting)

Arguments

nloop

The total number of MCMC iterations

nwarmup

The number of burn-in iterations

nexp_max

The maximum number of segments allowed

x

The data, a univariate time series, not a time series object

tmin

The minimum number of observations per segment. An optional argument defaulted to tmin = 40.

sigmasqalpha

An optional argument defaulted to sigmasqalpha = 100.

tau_prior_a

An optional argurment defaulted to tau_prior_a = -1.

tau_prior_b

An optional argurment defaulted to tau_prior_b = 0.

tau_up_limit

An optional argurment defaulted to tau_up_limit = 10000.

prob_mm1

An optional argurment defaulted to prob_mm1 = 0.8.

step_size_max

An optional argurment defaulted to step_size_max = 10.

var_inflate

An optional argurment defaulted to var_inflate = 1.

nbasis

An optional argurment defaulted to nbasis = 7.

nfreq_hat

An optional argurment defaulted to nfreq_hat = 50.

plotting

An optional argument for displaying output plots defaulted to FALSE. When set to TRUE, this displays the spectral and parition points.

Value

xi The partition points

log_spec_hat Estimates of the log spectra for all segments

nexp_curr The number of segments in each iteration.

Author(s)

Rosen, O., Wood, S. and Stoffer, D.

References

Rosen, O., Wood, S. and Stoffer, D. (2012). AdaptSPEC: Adaptive Spectral Estimation for Nonstationary Time Series. J. of the American Statistical Association, 107, 1575-1589

Examples

1
2
3
4
5
6
7
#Running adaptspec with the simulated_piecewise data.
data(simulated_piecewise)
model1 <- adaptspec(nloop = 80, nwarmup = 20,
   nexp_max = 5, x = simulated_piecewise[1:100])
str(model1)
summary(model1$nexp_curr)
plot(model1$nexp_curr)

BayesSpec documentation built on May 2, 2019, 2:44 a.m.