bmdl.MH: Metropolis-Hastings Algorithms for Stoachstic Model Search

Description Usage Arguments Value

Description

Two proposals: the function bmdl.MH.flip proposes to flip a random dimension, and the function bmdl.MH.swap propose to swap between a randomly chosen zero and a randomly chosen one.

Usage

1
2
3
bmdl.MH.flip(X, month, current, meta, p, fit, penalty, nu, a, b1, b2, period)

bmdl.MH.swap(X, month, current, 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.

current

A list of current changepoint model. Specifically, list(eta, inference, change.eta), where inference is the output of the function bmdl.eta.

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.

Value

A list of current changepoint model. Specifically, list(eta, inference, change.eta), where inference is the output of the function bmdl.eta.


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