Locally fit autoregressive models to non-stationary time series by a Bayesian procedure.
blocar(y, max.order = NULL, span, plot = TRUE)
variance.
AIC.
Bayesian weight.
partial autocorrelation.
coefficients ( average by the Bayesian weights ).
innovation variance.
initial point of the data fitted to the current model.
end point of the data fitted to the current model.
power spectrum.
a univariate time series.
upper limit of the order of AR model. Default is
\(2 \sqrt{n}\), where \(n\) is the length of the time series
y
.
length of basic local span.
logical. If TRUE
(default), spectrums pspec
are
plotted.
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.
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
Run the code above in your browser using DataLab