covML | R Documentation |
Function that gives the maximum likelihood estimate of the covariance matrix.
covML(Y, cor = FALSE)
Y |
Data |
cor |
A |
The function gives the maximum likelihood (ML) estimate of the covariance
matrix. The input matrix Y
assumes that the variables are represented
by the columns. Note that when the input data is standardized, the ML
covariance matrix of the scaled data is computed. If a correlation matrix is
desired, use cor = TRUE
.
Function returns the maximum likelihood estimate of the covariance
matrix
. In case cor = TRUE
, the correlation matrix is
returned.
Carel F.W. Peeters <carel.peeters@wur.nl>, Wessel N. van Wieringen
ridgeP
## Obtain some (high-dimensional) data
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
## Obtain ML estimate covariance matrix
Cx <- covML(X)
## Obtain correlation matrix
Cx <- covML(X, cor = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.