Description Usage Arguments Details Value Author(s) References See Also
This function just fulfills a very naive idea about moving window regression using rectangles to denote the “windows” and move them, and the corresponding AR(1) coefficients as long as rough confidence intervals are computed for data points inside the “windows” during the process of moving.
1 2 3 4 5 6 7 8 9 10 |
x |
univariate time-series (a single numerical vector); default to be
|
k |
an integer of the window width |
conf |
a positive number: the confidence intervals are computed as
|
mat, widths, heights |
arguments passed to |
lty.rect |
the line type of the rectangles respresenting the moving “windows” |
... |
other arguments passed to |
The AR(1) coefficients are computed by arima
.
A list containing
phi |
the AR(1) coefficients |
L |
lower bound of the confidence interval |
U |
upper bound of the confidence interval |
Yihui Xie
Examples at https://yihui.org/animation/example/mwar-ani/
Robert A. Meyer, Jr. Estimating coefficients that change over time. International Economic Review, 13(3):705-710, 1972.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.