car                   package:cts                   R Documentation

_F_i_t _C_o_n_t_i_n_u_o_u_s _T_i_m_e _A_R _M_o_d_e_l_s _t_o _I_r_r_e_g_u_l_a_r_l_y _S_a_m_p_l_e_d _T_i_m_e _S_e_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Fit a continuous AR model to an irregularly sampled univariate
     time series with the Kalman filter

_U_s_a_g_e:

     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)

_A_r_g_u_m_e_n_t_s:

       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.

_D_e_t_a_i_l_s:

     See references.

_V_a_l_u_e:

     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'

_A_u_t_h_o_r(_s):

     G. Tunnicliffe Wilson and Zhu Wang

_R_e_f_e_r_e_n_c_e_s:

     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

_S_e_e _A_l_s_o:

     'aic' for model selection

_E_x_a_m_p_l_e_s:

     ## Not run: 
     data(V22174)
     car(V22174,scale=0.2,order=7)

     data(asth)
     car(asth,scale=0.25,order=4)
     ## End(Not run)

