This function computes the theoretical Partial Autocorrelation (PACF) of an ARMA process.

theo_pacf(ar, ma = NULL, lagmax = 20)

Arguments

ar

A vector containing the AR coefficients.

ma

A vector containing the MA coefficients.

lagmax

An integer indicating the maximum lag up to which to compute the theoretical PACF.

Author

Yuming Zhang

Examples

# Computes the theoretical ACF for an ARMA(1,0) (i.e. a first-order autoregressive model: AR(1))
theo_pacf(ar = -0.25, ma = NULL, lagmax = 7)
#> , , Theoretical
#> 
#>   Theoretical
#> 1       -0.25
#> 2        0.00
#> 3        0.00
#> 4        0.00
#> 5        0.00
#> 6        0.00
#> 7        0.00
#> 
#> attr(,"type")
#> [1] "Autocorrelation"
#> attr(,"n")
#> [1] 7
#> attr(,"class")
#> [1] "PACF"  "array"
# Computes the theoretical ACF for an ARMA(2, 1)
theo_pacf(ar = c(.50, -0.25), ma = .20, lagmax = 10)
#> , , Theoretical
#> 
#>      Theoretical
#> 1   5.050000e-01
#> 2  -3.389711e-01
#> 3   6.747279e-02
#> 4  -1.349200e-02
#> 5   2.698379e-03
#> 6  -5.396757e-04
#> 7   1.079351e-04
#> 8  -2.158703e-05
#> 9   4.317405e-06
#> 10 -8.634811e-07
#> 
#> attr(,"type")
#> [1] "Autocorrelation"
#> attr(,"n")
#> [1] 10
#> attr(,"class")
#> [1] "PACF"  "array"