Form the correlation matrix of order order whose correlations follow the ma2 pattern. The resulting matrix is banded.
matrix
order
mat.ma2(MAparameters, order)
A numeric containing the two moving average parameter values of the process, being the weights given to the lag 1 and lag 2 random pertubations.
numeric
The order of the matrix to be formed.
A banded correlation matrix whose elements follow an ma2 pattern.
The correlations in the correlation matrix, corr say, are calculated from the moving average parameters, MAparameters. The values in
corr
MAparameters
the diagonal (k = 1) of corr are one;
k = 1
the first subdiagonal band (k = 2) of corr are equal to -MAparameters[1]*(1 - MAparameters[2]) / div;
k = 2
-MAparameters[1]*(1 - MAparameters[2]) / div
the second subdiagonal bande (k = 3) of corr are equal to -MAparameters[2] / div;
k = 3
-MAparameters[2] / div
in subsequent disgonal bands, (k = 4:order), of corr are zero,
k = 4:order
where div = 1 + MMAparameters[1]*MAparameter[1] + MAparameters[2]*MAparameters[2].
div = 1 + MMAparameters[1]*MAparameter[1] + MAparameters[2]*MAparameters[2]
mat.I, mat.J, mat.exp, mat.gau, mat.banded, mat.ar1, mat.ar3, mat.sar2, mat.ma1, mat.arma
mat.I
mat.J
mat.exp
mat.gau
mat.banded
mat.ar1
mat.ar3
mat.sar2
mat.ma1
mat.arma
# NOT RUN { corr <- mat.ma2(MAparameters = c(0.4, -0.2), order = 4) # }
Run the code above in your browser using DataLab