blocar | R Documentation |
Locally fit autoregressive models to non-stationary time series by a Bayesian procedure.
blocar(y, max.order = NULL, span, plot = TRUE)
y |
a univariate time series. |
max.order |
upper limit of the order of AR model. Default is
|
span |
length of basic local span. |
plot |
logical. If |
The basic AR model of scalar time series y(t) (t=1, \ldots ,n)
is given by
y(t) = a(1)y(t-1) + a(2)y(t-2) + \ldots + a(p)y(t-p) + u(t),
where p
is order of the model and u(t)
is Gaussian white noise
with mean 0
and variance v
. At each stage of modeling of locally
AR model, a two-step Bayesian procedure is applied
1. | Averaging of the models with different orders fitted to the newly obtained data. |
2. | Averaging of the models fitted to the present and preceding spans. |
AIC of the model fitted to the new span is defined by
AIC = ns \log( sd ) + 2k,
where ns
is the length of new data, sd
is innovation variance
and k
is the equivalent number of parameters, defined as the sum of
squares of the Bayesian weights. AIC of the model fitted to the preceding
spans are defined by
AIC( j+1 ) = ns \log( sd(j) ) + 2,
where sd(j)
is the prediction error variance by the model fitted to
j
periods former span.
var |
variance. |
aic |
AIC. |
bweight |
Bayesian weight. |
pacoef |
partial autocorrelation. |
arcoef |
coefficients ( average by the Bayesian weights ). |
v |
innovation variance. |
init |
initial point of the data fitted to the current model. |
end |
end point of the data fitted to the current model. |
pspec |
power spectrum. |
G.Kitagawa and H.Akaike (1978) A Procedure for The Modeling of Non-Stationary Time Series. Ann. Inst. Statist. Math., 30, B, 351–363.
H.Akaike (1978) A Bayesian Extension of the Minimum AIC Procedure of Autoregressive Model Fitting. Research Memo. NO.126. The Institute of The Statistical Mathematics.
H.Akaike, G.Kitagawa, E.Arahata and F.Tada (1979) Computer Science Monograph, No.11, Timsac78. The Institute of Statistical Mathematics.
data(locarData)
z <- blocar(locarData, max.order = 10, span = 300)
z$arcoef
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.