[Stable] Fast ARMA state-space h-step forecast and weights (C/BLAS)

ARMA_forecast(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

h <- 1000
X0 <- c(0.2, 0.1)
A <- ARMA_companion_matrix(0.2, 0.1)
b <- ARMA_vector_b(1,1)
ARMA_forecast(h, X0, A, b, intercept = 0)
#> # A tibble: 1 × 3
#>    step Yt_tilde_hat weights             
#>   <int>        <dbl> <list>              
#> 1  1000            0 <tibble [1,000 × 5]>