ARMA_next_step(h = 1, X0, A, b, intercept = 0, eps = 0)integer(1), number of steps ahead.
numeric vector of length p + q, state vector of past values.
numeric matrix of size p+q x p+q. See the function ARMA_companion_matrix for more details.
mumeric vector of length p+q. See the function ARMA_vector_b for more details.
Numeric scalar, intercept parameter.
optional numeric vector of length h. Next step new residuals.
Version 1.0.2
Other ARMA-moments:
ARMA_covariance(),
ARMA_expectation(),
ARMA_filter(),
ARMA_forecast(),
ARMA_variance()
# Companion matrix and vector b
A <- ARMA_companion_matrix(c(0.4), c())
b <- ARMA_vector_b(1,0)
# Initial value
X0 <- c(0.9)
# Next step forecast
ARMA_next_step(1, X0, A, b, intercept = 0.2, eps = 0)
#> [,1]
#> [1,] 0.56
# 3-steps ahead forecast
ARMA_next_step(3,X0, A, b, intercept = 0.2, eps = 0)
#> [,1]
#> [1,] 0.3696
# 10-step ahead forecast
ARMA_next_step(10, X0, A, b, intercept = 0.2, eps = 0)
#> [,1]
#> [1,] 0.3333928
# Next step simulation
eps <- rnorm(1)
ARMA_next_step(1, X0, A, b, intercept = 0.2, eps = eps)
#> [,1]
#> [1,] -0.8400435
# 3-steps ahead simulation
eps <- rnorm(3)
ARMA_next_step(3, X0, A, b, intercept = 0.2, eps = eps)
#> [,1]
#> [1,] -0.570026
# 10-step ahead simulation
eps <- rnorm(10)
ARMA_next_step(10, X0, A, b, intercept = 0.2, eps = eps)
#> [,1]
#> [1,] -0.4192065