# ARMAacf

0th

Percentile

##### Compute Theoretical ACF for an ARMA Process

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

Keywords
ts
##### Usage
ARMAacf(ar = numeric(), ma = numeric(), lag.max = r, pacf = FALSE)
##### Arguments
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?

##### Details

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

##### Value

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

##### References

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