EVOLUTION-MANAGER
Edit File: ARMAacf.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Compute Theoretical ACF for an ARMA Process</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for ARMAacf {stats}"><tr><td>ARMAacf {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compute Theoretical ACF for an ARMA Process</h2> <h3>Description</h3> <p>Compute the theoretical autocorrelation function or partial autocorrelation function for an ARMA process. </p> <h3>Usage</h3> <pre> ARMAacf(ar = numeric(), ma = numeric(), lag.max = r, pacf = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>ar</code></td> <td> <p>numeric vector of AR coefficients</p> </td></tr> <tr valign="top"><td><code>ma</code></td> <td> <p>numeric vector of MA coefficients</p> </td></tr> <tr valign="top"><td><code>lag.max</code></td> <td> <p>integer. Maximum lag required. Defaults to <code>max(p, q+1)</code>, where <code>p, q</code> are the numbers of AR and MA terms respectively.</p> </td></tr> <tr valign="top"><td><code>pacf</code></td> <td> <p>logical. Should the partial autocorrelations be returned?</p> </td></tr> </table> <h3>Details</h3> <p>The methods used follow Brockwell & Davis (1991, section 3.3). Their equations (3.3.8) are solved for the autocovariances at lags <i>0, …, max(p, q+1)</i>, and the remaining autocorrelations are given by a recursive filter. </p> <h3>Value</h3> <p>A vector of (partial) autocorrelations, named by the lags. </p> <h3>References</h3> <p>Brockwell, P. J. and Davis, R. A. (1991) <em>Time Series: Theory and Methods</em>, Second Edition. Springer. </p> <h3>See Also</h3> <p><code><a href="arima.html">arima</a></code>, <code><a href="ARMAtoMA.html">ARMAtoMA</a></code>, <code><a href="acf2AR.html">acf2AR</a></code> for inverting part of <code>ARMAacf</code>; further <code><a href="filter.html">filter</a></code>. </p> <h3>Examples</h3> <pre> 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 a.n <- 2^(-n) * (32/3 + 8 * n) /(32/3) (A.n <- ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10)) stopifnot(all.equal(unname(A.n), c(1, a.n))) ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10, pacf = TRUE) zapsmall(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)) </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>