Description Usage Arguments Details
Create a plot, with time series data x
shown in points, linear trends
under the selected changepoint model in blue lines, estimated changepoints
in verticle dashed blue lines, and fitted value (including seasonal means
and linear trends) in a purple line. Optional residual plots can also be
plotted.
1 2 3 |
x |
The time series data, a numeric vector of length |
dates |
The dates records are observed, a |
varname |
The name of the variable |
current |
A list object representing a changepoint model. It contains
the following components: |
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. |
scale_trend_design |
The factor multiplied to the design matrix of trend. Default is 1/50. |
eta |
A multiple changepoint configuration, i.e., model. It is a 0/1
indicator vector of length |
seasonal_cycles |
Estimated seasonal means, a numeric vector of length
|
mean_and_trend |
Estimated piecewise linear fits, a numeric vector of
length |
plot_res |
Logical, whether residual plots will be added after the main
plots. If |
yw_phi |
Yule walker estimator of AR coefficients, a vector of length
|
... |
Other arguments for the |
Two sets of inputs can be used:
Either current
, A
, scale_trend_design
,
Or eta
, seasonal_cycles
, mean_and_trend
.
When used, every inputs in that set must but non-NULL, while all inputs in the other set must be NULL.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.