Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

covML

Maximum likelihood estimation of the covariance matrix


Description

Function that gives the maximum likelihood estimate of the covariance matrix.

Usage

covML(Y, cor = FALSE)

Arguments

Y

Data matrix. Variables assumed to be represented by columns.

cor

A logical indicating if the correlation matrix should be returned

Details

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.

Value

Function returns the maximum likelihood estimate of the covariance matrix. In case cor = TRUE, the correlation matrix is returned.

Author(s)

Carel F.W. Peeters <cf.peeters@vumc.nl>, Wessel N. van Wieringen

See Also

Examples

## 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)

rags2ridges

Ridge Estimation of Precision Matrices from High-Dimensional Data

v2.2.4
GPL (>= 2)
Authors
Carel F.W. Peeters [cre, aut], Anders Ellern Bilgrau [aut], Wessel N. van Wieringen [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.