Description Usage Arguments Details Value References Examples
For univiariate time series. It accomodates metadata (if any), and can handel monthly data and annual data.
1 2 3 4 5 6 | bmdl.mean.shift(X, month = NULL, meta = NULL, iter = 10000,
thin = max(1, iter/1000), type = "monthly", p = 3, fit = "marlik",
penalty = "bmdl", nu = 5, a = 1, b1 = 19 * (type == "annual") + 239 *
(type == "monthly"), b2 = (b1 - 4)/5, start.eta = NULL,
track.time = TRUE, show.summary = 10, show.month = FALSE,
start.year = 1)
|
X |
A vector of length |
month |
A vector of length |
meta |
A 0-1 indicator vector of length N, metadata indicator.
The first |
iter |
Total number of MCMC iterations. |
thin |
Thinning; save one MCMC iteration for every |
type |
Whether data are observed 'annual' or 'monthly'. Default is 'monthly'. |
p |
The order of the AR process. |
fit |
For likelihood calculation, |
penalty |
For penalty function calculation, |
nu |
Prior variance scale of |
a |
The first and second parameters in the Beta-Binomial prior; only
used if |
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. |
start.eta |
A 0-1 indicator vector of length |
track.time |
Logical; whether to report processing time (in seconds). |
show.summary |
Integer; the number of top models to print. Default value is 10. |
show.month |
Logical; if show month in the summary. Default is
|
start.year |
Integer; the year time 1 is in. Default value is 1. |
To compute BMDL, use fit = 'marlik'
and penalty = 'bmdl'
.
To compute automatic MDL, use fit = 'lik'
and
penalty = 'mdl'
.
To compute BIC, use penalty = 'BIC'
(the fit
argument
does not matter in this case).
Note, the marginal likelihood fit = 'marlik'
can also be
combined with penalty = 'uniform'
, which assigns uniform prior on
the model space.
Please see the references for more details.
mcmc |
A ( |
map200 |
A 200 by ( |
input.parameters |
A list of all the following input parameters:
|
Yingbo Li, Robert Lund, and Anuradha Hewaarachchi, "Multiple Changepoint Detection with Partial Information on Changepoint Times". Working paper.
1 2 3 4 5 6 7 | data(tuscaloosa);
X = tuscaloosa[, 3];
## For illustration purpose, here iter is small.
## To get meaningfull inference, use a larger value, e.g., iter = 1e5.
results = bmdl.mean.shift(X, month = tuscaloosa[, 2], meta = tuscaloosa[, 7],
iter = 1e2);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.