mat.sar2 {dae} R Documentation

## Forms an sar2 correlation matrix

### Description

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.

### Usage

mat.sar2(gamma, order, print = NULL)

### Arguments

 gamma A numeric containing the two values of gamma, being parameters linked with spatial dependence and competition. order The order of the matrix to be formed. print A character giving the object to be printed. Currently, only the claculated values of the ar3parameters can be printed. If NULL, nothing is printed.

### Details

The values of the AR3 parameters, phi, are calculated from the gammas as follows:
phi = gamma + 2 * gamma; phi = -gamma * (2*gamma + gamma);
phi = gamma * gamma * gamma.

Then the correlations in the correlation matrix, corr say, are calculated from the correlation parameters, phi. Let omega = 1 - phi - phi * (phi + phi). Then the values in

• the diagonal of corr (k = 1) are one;

• the first subdiagonal band (k = 2) of corr are equal to (phi + phi*phi) / omega;

• the second subdiagonal band (k = 3) of corr are equal to
(phi * (phi + phi) + phi * (1 - phi)) / omega;

• the subsequent subdiagonal bands, (k = 4:order), of corr are equal to
phi*corr[k-1] + phi*corr[k-2] + phi*corr[k-3].

### Value

A banded correlation matrix whose elements follow an sar2 pattern.

### Author(s)

Chris Brien

mat.I, mat.J, 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)