ARMAacf                package:stats                R Documentation

_C_o_m_p_u_t_e _T_h_e_o_r_e_t_i_c_a_l _A_C_F _f_o_r _a_n _A_R_M_A _P_r_o_c_e_s_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute the theoretical autocorrelation function or partial
     autocorrelation function for an ARMA process.

_U_s_a_g_e:

     ARMAacf(ar = numeric(0), ma = numeric(0), lag.max = r, pacf = FALSE)

_A_r_g_u_m_e_n_t_s:

      ar: numeric vector of AR coefficients

      ma: numeric vector of MA coefficients

 lag.max: integer.  Maximum lag required.  Defaults to 'max(p, q+1)',
          where 'p, q' are the numbers of AR and MA terms respectively.

    pacf: logical.  Should the partial autocorrelations be returned?

_D_e_t_a_i_l_s:

     The methods used follow Brockwell & Davis (1991, section 3.3). 
     Their equations (3.3.8) are solved for the autocovariances at lags
     0, ..., max(p, q+1), and the remaining autocorrelations are given
     by a recursive filter.

_V_a_l_u_e:

     A vector of (partial) autocorrelations, named by the lags.

_R_e_f_e_r_e_n_c_e_s:

     Brockwell, P. J. and Davis, R. A. (1991) _Time Series: Theory and
     Methods_, Second Edition.  Springer.

_S_e_e _A_l_s_o:

     'arima', 'ARMAtoMA', 'acf2AR' for inverting part of 'ARMAacf';
     further 'filter'.

_E_x_a_m_p_l_e_s:

     ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10)

     ## Example from Brockwell & Davis (1991, pp.92-4)
     ## answer 2^(-n) * (32/3 + 8 * n) /(32/3)
     n <- 1:10; 2^(-n) * (32/3 + 8 * n) /(32/3)
     ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10, pacf = TRUE)
     ARMAacf(c(1.0, -0.25), lag.max = 10, pacf = TRUE)

     ## Cov-Matrix of length-7 sub-sample of AR(1) example:
     toeplitz(ARMAacf(0.8, lag.max = 7))

