

arima0 {ts}                                  R Documentation

_A_R_I_M_A _M_o_d_e_l_l_i_n_g _o_f _T_i_m_e _S_e_r_i_e_s _-_- _P_r_e_l_i_m_i_n_a_r_y _V_e_r_s_i_o_n

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

     Fit an ARIMA model to a univariate time series by exact
     maximum likelihood, and forecast from the fitted model.

_U_s_a_g_e_:

     arima0(x, order = c(0, 0, 0),
            seasonal = list(order = c(0, 0, 0), period = NA),
            xreg = NULL, include.mean, na.action = na.fail,
            delta = 0.01, transform.pars = 2)
     predict(arima0.obj, n.ahead = 1, newxreg, se.fit = TRUE)
     arima0.diag(fit, gof.lag = 10)

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

       x: a univariate time series

   order: A specification of the non-seasonal part of the
          ARIMA model: the three components are (p, d, q),
          the AR order, the degree of differencing and the
          MA order.

seasonal: A specification of the seasonal part of the ARIMA
          model, plus the period (which defaults to `fre-
          quency(x)').

    xreg: Optionally, a vector or matrix of external regres-
          sors, which must have the same number of rows as
          `x'.

include.mean: Should the ARIMA model include a mean term?
          The default is `TRUE' for undifferenced series,
          `FALSE' for differenced ones (where a mean would
          not affect the fit nor predictions).

na.action: Function to be applied to remove missing values.

   delta: A value to indicate at which point `fast recur-
          sions' should be used. See the Details section.

transform.pars: If greater than 0, the ARMA parameters are
          transformed to ensure that they remain in the
          region of invertibility. If equal to 2, the opti-
          mization is rerun on the original scale to find
          the Hessian.

arima0.obj, fit: The result of an `arima0' fit.

 newxreg: New values of `xreg' to be used for prediction.
          Must have at least `n.ahead' rows.

 n.ahead: The number of steps ahead for which prediction is
          required.

  se.fit: Logical: should standard errors of prediction be
          returned?

 gof.lag: Number of lags to be used in goodness-of-fit test.

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

     Different definitions of ARIMA models have different
     signs for the AR and/or MA coefficients. The definition
     here has

          `X[t] = a[1]X[t-1] + ... + a[p]X[t-p] + e[t] + b[1]e[t-1] + ... + b[q]e[t-q]'

     and so the MA coefficients differ in sign from those of
     S-PLUS. Further, if `include.mean' is true, this for-
     maula applies to X-m rather than X.

     The exact likelihood is computed via a state-space rep-
     resentation of the ARMA process, and the innovations
     and their variance found by a Kalman filter using the
     Fortran code of Gardener et al.  (1980).  This has the
     option to switch to `fast recursions' (assume an effec-
     tively infinite past) if the innovations variance is
     close enough to its asymptotic bound. The argument
     `delta' sets the tolerance: at its default value the
     approximation is normally negligible and the speed-up
     considerable. Exact computations can be ensured by set-
     ting `delta' to a negative value.

     The variance matrix of the estimates is found from the
     Hessian of the log-likelihood, and so may only be a
     rough guide, especially for fits close to the boundary
     of invertibility.

     Optimization is (currently) done by `nlm'. It will work
     best if the columns in `xreg' are roughly scaled to
     zero mean and unit variance.

     Finite-history prediction is used. This is only statis-
     tically efficient if the MA part of the fit is invert-
     ible, so `predict.arima0' will give a warning for non-
     invertible MA models.

_V_a_l_u_e_:

     For `arima0', a list of class `"arima0"' with compo-
     nents:

    coef: a vector of AR, MA and regression coefficients,

  sigma2: the MLE of the innovations variance.

var.coef: the estimated variance matrix of the coefficients
          `coef'. If `transform.pars = 1', only the portion
          corresponding to the untransformed parameters is
          returned.

  loglik: the maximized log-likelihood (of the differenced
          data).

    arma: A compact form of the specification, as a vector
          giving the number of AR, MA, seasonal AR and sea-
          sonal MA coefficients, plus the period and the
          number of non-seasonal and seasonal differences.

     aic: the AIC value corresponding to the log-likelihood.

   resid: the residuals.

    call: the matched call.

  series: the name of the series `x'.

convergence: the `code' returned by `nlm'.

          For `predict.arima0', a time series of predic-
          tions, or if `se.fit = TRUE', a list with compo-
          nents `pred', the predictions, and `se', the esti-
          mated standard errors. Both components are time
          series.

_N_o_t_e_:

     This is a preliminary version, and will be replaced in
     due course.

     The standard errors of prediction exclude the uncer-
     tainty in the estimation of the ARMA model and the
     regression coefficients.

     The results are likely to be different from S-PLUS's
     `arima.mle', which computes a conditional likelihood
     and does not include a mean in the model. Further, the
     convention used by `arima.mle' reverses the signs of
     the MA coefficients.

_A_u_t_h_o_r_(_s_)_:

     B.D. Ripley

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

     Brockwell, P. J. and Davis, R. A. (1996) Introduction
     to Time Series and Forecasting. Springer, New York.
     Sections 3.3 and 8.3.

     Gardener, G, Harvey, A. C. and Phillips, G. D. A.
     (1980) Algorithm AS154. An algorithm for exact maximum
     likelihood estimation of autoregressive-moving average
     models by means of Kalman filtering.  Applied Statis-
     tics 29, 311-322.

     Harvey, A. C. (1993) Time Series Models, 2nd Edition,
     Harvester Wheatsheaf, section 4.4.

     Harvey, A. C. and McKenzie, C. R. (1982) Algorithm
     AS182.  An algorithm for finite sample prediction from
     ARIMA processes.  Applied Statistics 31, 180-187.

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

     `ar'

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

     data(lh)
     arima0(lh, order=c(1,0,0))
     arima0(lh, order=c(3,0,0))
     arima0(lh, order=c(1,0,1))
     predict(arima0(lh, order=c(3,0,0)), n.ahead=12)

     data(USAccDeaths)
     fit <- arima0(USAccDeaths, order=c(0,1,1), seasonal=list(order=c(0,1,1)))
     fit
     predict(fit, n.ahead=6)

     data(LakeHuron)
     arima0(LakeHuron, order=c(2,0,0), xreg=1:98)

