| mat.sar2 | R Documentation |
Form the correlation matrix of order order whose
correlations follow the sar2 pattern, a pattern used in crop competition
models. The resulting matrix
is banded and is a constrained AR3 matrix.
mat.sar2(gamma, order, print = NULL)
gamma |
A |
order |
The order of the |
print |
A |
The values of the AR3 parameters, phi, are calculated from the gammas as follows:
phi[1] = gamma[1] + 2 * gamma[2]; phi[2] = -gamma[2] * (2*gamma[2] + gamma[1]);
phi[3] = gamma[1] * gamma[2] * gamma[2].
Then the correlations in the correlation matrix, corr say, are calculated
from the correlation parameters, phi.
Let omega = 1 - phi[2] - phi[3] * (phi[1] + phi[3]).
Then the values in
the diagonal of corr (k = 1) are one;
the first subdiagonal band (k = 2) of corr are equal to
(phi[1] + phi[2]*phi[3]) / omega;
the second subdiagonal band (k = 3) of corr are equal to
(phi[1] * (phi[1] + phi[3]) + phi[2] * (1 - phi[2])) / omega;
the subsequent subdiagonal bands, (k = 4:order), of corr are equal to
phi[1]*corr[k-1] + phi[2]*corr[k-2] + phi[3]*corr[k-3].
A banded correlation matrix whose elements follow an sar2 pattern.
Chris Brien
mat.I, mat.J, mat.cor, mat.corg,
mat.banded, mat.exp,
mat.gau, mat.ar1, mat.ar2, mat.ar3, mat.sar,
mat.ma1, mat.ma2, mat.arma
corr <- mat.sar2(gamma = c(-0.4, 0.2), order = 4)
corr <- mat.sar2(gamma = c(-0.4, 0.2), order = 4, print = "ar3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.