R/f_convenience_covML.R

Defines functions covUBtoML covMLtoUB covML

Documented in covML covMLtoUB covUBtoML

# Maximum likelihood covariance estimate:
covML <- function(x,...){
  (nrow(x)-1)/(nrow(x)) * stats::cov(x, ...)
}

# transform between ML and unbiased estimators:
covMLtoUB <- function(x,n,...){
  n/(n-1) * x
}

covUBtoML <- function(x,n,...){
  (n-1)/n * x
}

Try the psychonetrics package in your browser

Any scripts or data that you put into this service are public.

psychonetrics documentation built on Oct. 3, 2023, 5:09 p.m.