car {cts} | R Documentation |
Fit a continuous AR model to an irregularly sampled univariate time series with the Kalman filter
car(x, y=NULL, scale = 1.5, order = 3, ari= TRUE, phi = rep(0, order), vri = FALSE, vr = 0, pfi = "MAPS", ccv = "CTES", lpv = TRUE, scc = TRUE, n.ahead = 10, nit = 40, opm = 1, rgm = 1, req = 0.5, con = 1e-05, rpe = 1, ivl = 0.01, fac = 10, stl = 1e-05, sml = 100, gtl = 1e+05, kst = TRUE, fct = TRUE, fty=2)
x |
two column data frame or matrix with the first column
being the sampled time and the second column being the observations at
the first column; otherwise x is a numeric vector of sampled time. |
y |
not used if x has two columns; otherwise y is a numeric vector of observations at sampled time x . |
scale |
The kappa value referred to in the paper. |
order |
order of autoregression. |
ari |
ari=TRUE : parameter starting values follow phi . ari=FALSE : they are taken as zero |
phi |
parameter starting values used only if ari=TRUE . |
vri |
vri=FALSE , observation noise not included in the
model. vri=TRUE , observation noise included |
vr |
0.5, initial value of observation noise ratio: only if
vri=TRUE |
pfi |
always use the option pfi="MAPS". |
ccv |
ccv="CTES" for constant term estimation. ccv="MNCT" if mean correction, ccv=NULL if omitted. |
lpv |
lpv=TRUE always use this option. |
scc |
scc=TRUE always use this option. |
n.ahead |
number of steps ahead at which to predict. |
nit |
number of iteations. |
opm |
opm=1 always use this. |
rgm |
rgm=1 always use this. |
req |
root equality switch value. |
con |
convergence criterion. |
rpe |
relative size of parameter perturbations. |
ivl |
initial value of step size constraint parameter. |
fac |
step size constraint modification parameter. This value may
be setup to fac=5 for better convergency. |
stl |
typical smallest step size parameter. |
sml |
typical small step size parametrr. |
gtl |
typical greatest step size parameter. |
kst |
kst=TRUE to save estimated states. |
fct |
fct=TRUE to use all time series to fit the model. |
fty |
fty=1 forecast past the end. fty=2 forecast
last L-steps. fty=3 forecast last L-steps updated (filtering)types. |
See references.
A list of class "car"
with the following elements:
n.used |
The number of observations of ser used in fitting |
order |
The order of the fitted model. This is chosen by the user. |
np |
The number of parameters estimated. This may include the mean and the observation noise ratio. |
scale |
The kappa value referred to in the paper. |
vr |
The estimated observation noise ratio. |
sigma2 |
The estimated innovation variance. |
phi |
The estimated reparameterized autoregressive parameters. |
x.mean |
The estimated mean of the series used in fitting and for use in prediction. |
b |
All estimated parameters, which include phi , and possibly x.mean and vr . |
delb |
The estimated standard error of b |
essp |
The estimated correlation matrix of b |
ecov |
The estimated covariance matrix of phi . See also
aic |
rootr |
The real part of roots of phi . See also aic |
rooti |
The imaginary part of roots of phi . See also
aic |
tim |
The numeric vector of sampled time. |
ser |
The numeric vector of observations at sampled time
tim . |
filser |
The filtered time series with the Kalman filter. |
filvar |
The estimated variance of Kalman filtered time series
filser |
sser |
The smoothed time series with the Kalman smoother. |
svar |
The estimated variance of smoothed time series
sser |
stdred |
The standardized residuals from the fitted model. |
predict |
Predictions for the series which has been used to fit the model. |
predict.var |
Prediction variance of predict |
G. Tunnicliffe Wilson and Zhu Wang
Belcher, J. and Hampton, J. S. and Tunnicliffe Wilson, G. (1994). Parameterization of continuous time autoregressive models for irregularly sampled time series data. Journal of the Royal Statistical Society, Series B, Methodological,56,141–155
Jones, Richard H. (1981). Fitting a continuous time autoregression to discrete data. Applied Time Series Analysis II, 651–682
Wang, Zhu (2004). The Application of the Kalman Filter to Nonstationary Time Series through Time Deformation. PhD thesis, Southern Methodist University
aic
for model selection
## Not run: data(V22174) car(V22174,scale=0.2,order=7) data(asth) car(asth,scale=0.25,order=4) ## End(Not run)