txtn.MH: Metropolis-Hastings Algorithms for Stoachstic Model Search,...

Description Usage Arguments Value

Description

Two proposals: the function txtn.MH.flip propose to flip a random dimension, and the function txtn.MH.swap propose to swap between a category 4 (no changes in either series) and a catogory 1-3 (change in at least one series).

Usage

1
2
3
txtn.MH.flip(X, month, current, meta, p, nu, alpha1, alpha2, period, q)

txtn.MH.swap(X, month, current, meta, p, nu, alpha1, alpha2, period)

Arguments

X

A N by 2 matrix, observed time series data. Columns are Tmax and Tmin, respectively.

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, count.eta, inference, change.eta), where inference is the output of the function txtn.eta.

meta

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

p

The order of the VAR process.

nu

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

alpha1

The parameter in the Multinomial-Dirichlet prior of eta, for un-documented times (i.e., times not in metadata). Default value is c(3/7, 2/7, 2/7, 239) for monthly data, and c(3/7, 2/7, 2/7, 19) for annual data.

alpha2

The parameter in the Multinomial-Dirichlet prior of eta, for documented times (i.e., times in metadata). Default value is c(3/7, 2/7, 2/7, 47) for monthly data, and c(3/7, 2/7, 2/7, 3) for annual data.

period

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

q

A 4 by 4 transition matrix of the proposal distribution, only used in the flip proposal.

Value

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


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