powered by
Convert auto regression (AR) coefficients to moving average (MA) coefficients
ar2ma(ar, p, n = 11, CharValue = TRUE)
AR coefficients matrix which is k x kp dimension, k is numbers of variables, and no constant.
lags orders of AR.
lags orders of MA generated.
logical value, whether compute character value.
a matrix which is MA coefficients.
the formula is, $$A_s = F_1 * A_{s-1} + F_2 * A_{s-2} + ... + F_p * A_{s-p}$$ where A is MA coefficients, F is AR coefficients.
# NOT RUN { require(vars) data(Canada) ar <- Bcoef(VAR(Canada, p = 2, type = "none")) ar ar2ma(ar, p = 2) # }
Run the code above in your browser using DataLab