unibar {timsac} | R Documentation |
This program fits an autoregressive model by a Bayesian procedure. The least squares estimates of the parameters are obtained by the householder transformation.
unibar(y, ar.order=NULL, plot=TRUE)
y |
a univariate time series. |
ar.order |
order of the AR model. Default is 2*sqrt(n), where n is the length of the time series y. |
plot |
logical. If TRUE (default) daic, pacoef and pspec are plotted. |
The AR model is given by
y(t) = a(1)y(t-1) + .... + a(p)y(t-p) + u(t)
where p is AR order and u(t) is Gaussian white noise with mean 0 and variance v(p).
The basic statistic AIC is defined by
AIC = nlog(det(v)) + 2m,
where n is the length of data, v is the estimate of innovation variance, and m is the order of the model.
Bayesian weight of the m-th order model is defined by
W(m) = CONST*C(m) / (m+1),
where CONST is the normalizing constant and C(m)=exp(-0.5AIC(m)).
The equivalent number of free parameter for the Bayesian model is defined by
ek = D(1)^2 +...+ D(k)^2 +1
where D(j) is defined by D(j)=W(j) +...+ W(k).
m in the definition of AIC is replaced by ek to be define an equivalent AIC for a Bayesian model.
mean |
mean. |
var |
variance. |
v |
innovation variance. |
aic |
AIC(m) (m = 0,...,ar.order). |
aicmin |
minimum AIC. |
daic |
AIC(m)-aicmin (m = 0,...,ar.order). |
order.maice |
order of minimum AIC. |
v.maice |
innovation variance attained at m=order.maice. |
pacoef |
partial autocorrelation coefficients (least squares estimate). |
bweight |
Bayesian Weight. |
integra.bweight |
integrated Bayesian weights. |
v.bay |
innovation variance of Bayesian model. |
aic.bay |
AIC of Bayesian model. |
np |
equivalent number of parameters. |
pacoef.bay |
partial autocorrelation coefficients of Bayesian model. |
arcoef |
AR coefficients of Bayesian model. |
pspec |
power spectrum. |
H.Akaike (1978) A Bayesian Extension of The Minimum AIC Procedure of Autoregressivemodel Fitting. Research memo. No.126. The Institute of Statistical Mathematics.
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, G.Kitagawa, E.Arahata and F.Tada (1979) Computer Science Monograph, No.11, Timsac78. The Institute of Statistical Mathematics.
data(Canadianlynx) z <- unibar(Canadianlynx, ar.order=20) z$arcoef