Function that performs maximum likelihood estimation of the covariance matrix, with various types of assumptions on its structure.

covMLknown(
  Y,
  covMat = NULL,
  corMat = NULL,
  corType = "none",
  varType = "none",
  nInit = 100
)

Arguments

Y

Data matrix. Variables assumed to be represented by columns.

covMat

A positive-definite covariance matrix. When specified, the to-be-estimated covariance matrix is assumed to be proportional to the specified covariance matrix. Hence, only a constant needs to estimated.

corMat

A positive-definite correlation matrix. When specified, the to-be-estimated covariance matrix is assumed to have this correlation structure. Hence, only the marginal variances need to be estimated.

corType

A character, either "none" (no structure on the correlation among variate assumed) or "equi" (variates are equi-correlated).

varType

A character, either "none" (no structure on the marginal variances of the variates assumed) or "common" (variates have equal marginal variances).

nInit

An integer specifying the maximum number of iterations for likelihood maximization when corType="equi" .

Value

The maximum likelihood estimate of the covariance matrixunder the specified assumptions on its structure.

Details

The function gives the maximum likelihood estimate of the covariance matrix. The input matrix Y assumes that the variables are represented by the columns.

When simultaneously covMat=NULL, corMat=NULL, corType="none" and varType="none" the covML-function is invoked and the regular maximum likelihood estimate of the covariance matrix is returned.

See also

Author

Wessel N. van Wieringen, Carel F.W. Peeters <carel.peeters@wur.nl>

Examples


## Obtain some data
p = 10
n = 100
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:10] = letters[1:10]

## Obtain maximum likelihood estimate covariance matrix
Cx <- covMLknown(X, corType="equi", varType="common")