Description Usage Arguments Value
Apply Bayesian Minimum Description Length to detect multiple changepoints, individually for a group of time series data (one for each variable to be monitored). Returns the optimal changepoint models, and graphic outputs as a pdf file.
1 2 3 4 5 | bcp(X, pdf_file = "bcp.pdf", select = "MAP", iter = 10000, thin = max(1,
iter/1000), p = 2, time_unit = "month", seasonal_means = "harmonic",
k = 3, scale_trend_design = 0.05, fit = "marlik", penalty = "bmdl",
nu = 5, a = 1, b = 1, width = 8, height = 4, mar = c(5, 5, 4, 1),
mfrow = c(1, 1), start_eta = NULL, track_time = TRUE)
|
X |
Variables to be monitored, a |
pdf_file |
Name of the output pdf file with extension name, a character; can include path. |
select |
The selected model to plot, |
iter |
Total number of MCMC iterations. |
thin |
Thinning; save one MCMC iteration for every |
p |
The order of the AR process. |
time_unit |
Default is |
seasonal_means |
The seasonal means variables in the linear model.
Either |
k |
The highest degree of harmonic regression. It is only used if
the argument |
scale_trend_design |
The factor multiplied to the design matrix of trend. Default is 1/50. |
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 |
b |
The first and second parameters in the Beta-Binomial prior; only
used if |
width, height |
Width and height of the output pdf (per page). |
mar |
Margin of the output pdf (per page). |
mfrow |
Number of rows and columns of figures on per pdf page. |
start_eta |
A vector of 0/1 indicators for the initial model, or
|
track_time |
Logical, whether to show runtime on screen. |
eta_all |
Estimated changepoints for all variables; a matrix of 0/1
indicators, where each row is for one variable, in the same order as
the input data |
seasonal_cycles_all |
Estimated seasonal means for all variables, where each row is for one variable. |
mean_and_trend_all |
Estimated linear trends for all variables, where each row is for one variable. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.