Description Usage Arguments Value
One MCMC iteration: propose to flip one random component of xi
1 2 | xi_MH_flip(x, A, current, p, fit, penalty, nu, kappa, a, b, scale_trend_design,
weights)
|
x |
The time series data, a numeric vector of length |
A |
The design matrix for the nuisance coefficients in the linear model. It is usually the matrix of seasonal indicators, or the design matrix for harmonic regression with a column of all 1 for intercept. |
current |
A list object representing a changepoint model. It contains
the following components: |
p |
The order of the AR process. |
fit |
For likelihood calculation, |
penalty |
For penalty function calculation, |
nu |
Prior variance scale of |
kappa |
Prior variance scale of outliers. |
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 |
scale_trend_design |
The factor multiplied to the design matrix of trend. Default is 1/50. |
weights |
A numeric vector of observation weights, defined the same as
the |
A list object representing the (maybe) updated changepoint model.
eta |
The (maybe) updated changepoint model, in the format of a vector of 0/1 indicators. |
xi |
The outliers, in the format of a vector of 0/1 indicators. |
inference |
Output of the |
change_eta |
Logical, if this |
change_xi |
Logical, if this |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.