Learn R Programming

tsPI (version 1.0.4)

acv_arma: Compute a theoretical autocovariance function of ARMA process

Description

Function acv_arma computes a theoretical autocovariance function of ARMA process.

Usage

acv_arma(phi, theta, n)

Value

vector of length n containing the autocovariances

Arguments

phi

vector containing the AR parameters

theta

vector containing the MA parameters

n

length of the time series

See Also

dacv_arma.

Examples

Run this code

## Example from Brockwell & Davis (1991, page 92-94)
## also in help page of ARMAacf (from stats)
n <- 0:9
answer <- 2^(-n) * (32/3 + 8 * n) /(32/3)
acv <- acv_arma(c(1.0, -0.25), 1.0, 10)
all.equal(acv/acv[1], answer)

Run the code above in your browser using DataLab