[Stable] Compute the conditional mean of an ARMA model

ARMA_expectation(h, X0, A, b, intercept = 0)

Arguments

h

integer(1), number of steps ahead.

X0

numeric vector of length p + q, state vector of past values.

A

numeric matrix of size p+q x p+q. See the function ARMA_companion_matrix for more details.

b

mumeric vector of length p+q. See the function ARMA_vector_b for more details.

intercept

Numeric scalar, intercept parameter.

Note

Version 1.0.2

Examples

A <- ARMA_companion_matrix(c(0.4, 0.1), c(0.1, 0.05))
b <- ARMA_vector_b(2,2)
intercept <- 0.2
X0 <- c(0.9, 0.2, -0.1, 0.3)
ARMA_expectation(h = 3, X0, A, b, intercept)
#>    t+1    t+2    t+3 
#> 0.5850 0.5190 0.4661