bmdl.eta: Calculate BMDL for a Given Changepoint Model

Description Usage Arguments Details Value

Description

For mean shifts detection in a univariate time series. These functions can handle metadata.

Usage

1
bmdl.eta(X, month, eta, meta, p, fit, penalty, nu, a, b1, b2, period)

Arguments

X

A vector of length N, observed time series data.

month

A vector of length N, month indicators. Takes value in 1, 2, ..., 12 for monthly data, or 1 for annual data.

eta

A 0-1 indicator vector of length N, changepoint model. The first p elemenet are always 0.

meta

A 0-1 indicator vector of length N, metadata indicator. The first p elemenet are always 0.

p

The order of the AR process.

fit

For likelihood calculation, 'marlik' for marginal likelihood, or 'lik' for likelihood. Note that the 'lik' option already includes the two-part MDL of mu.

penalty

For penalty function calculation, 'bmdl' for Beta-Binomial prior, or 'mdl' for MDL.

nu

Prior variance scale of mu; only used if fit == 'marlik'.

a

The first and second parameters in the Beta-Binomial prior; only used if penalty == 'bmdl'.

b1

The b parameter in the Beta-Binomial prior of η, for un-documented times (i.e., times not in metadata). Default value is 239 for monthly data, and 19 for annual data.

b2

The b parameter in the Beta-Binomial prior of η, for documented times (i.e., times in metadata). Default value is 47 for monthly data, and 3 for annual data.

period

Period of the seasonal cycle, 12 for monthly data, or 1 for annual data.

Details

Value

mdl

The Bayesian MDL score for the changepoint model eta.

phi

A vector of length p, the Yule-Walker estimator of the autocorrelation parameter phi.

sigmasq

The EB estimator of the white noise variance sigmasq.

mu

A vector of length sum(eta); the conditional posterior mean of regime-wise means mu.

s

A vector of length period, the EB estimator of the monthly means s.


yingboli/BayesMDL documentation built on May 29, 2019, 12:18 p.m.