This function computes the covariance/correlation matrix for a stationary auto-regressive moving-average (ARMA) model. The user specifies
the matrix size n
and the function returns a matrix of covariance/correlation values at all times Time[1], ... , Time[n]
(in the
case where conditioning values are specified using the condvals
argument, only the time values for non-conditional values are included).
The function requires the model to be stationary, which means that the vector of auto-regression coefficients must give an auto-regressive
characteristic polynomial with roots outside the unit circle.
ARMA.var(
n,
condvals = as.numeric(NA),
ar = numeric(0),
ma = numeric(0),
corr = FALSE
)
Positive integer giving the number of values in the time-series (output variance matrix is an n x n matrix)
Either a single value NA
or a numeric vector with n
elements; numeric entries are conditioning values for the generated vector
Vector of auto-regressive coefficients (all roots of AR characteristic polynomial must be outside the unit circle)
Vector of moving-average coefficients
Logical; if TRUE
the function returns the correlation matrix; if FALSE
the function returns the covariance matrix