Description Usage Arguments Details Value Implementation Examples
Compute the unconditional covariance matrix of the observations
y_t
.
1 | cov_var_process(A, SIGMA, h = 0, tol = 1e-07)
|
A |
A |
SIGMA |
A |
h |
An integer scalar, the horizon at which to compute the
covariances. Defaults to the contemporaneous covariances of |
tol |
A numeric scalar, the tolerance level for stopping the computation. See Details. |
Computing the covariance matrix invloves an infinite sum. Computation is
stopped if the summed differences of the elements of two iterations of the
covariance matrix is less than the tolerance level tol
.
A (K x K)
numeric matrix. It containes the covariances of y_t
and
y_{t+h}
.
Plain brute force with no regard for efficiency.
1 2 3 4 5 6 7 8 9 10 11 | K <- 4
p <- 2
A <- matrix(0.0, K, K * p)
SIGMA <- matrix(0.5, K, K)
cov_var_process(A, SIGMA)
A <- matrix(-0.2, K, K * p); diag(A) <- 1:K / 10
cov_var_process(A, SIGMA)
cov_var_process(A, SIGMA, h = 5)
cov_var_process(A, SIGMA, h = 150)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.