startvals.cov {EMgaussian}R Documentation

Starting values for means and covariances

Description

Starting values for means and covariances

Usage

startvals.cov(dat, start = c("diag", "pairwise", "listwise", "full"))

Arguments

dat

Data frame or matrix that contains the raw data.

start

Starting value method (see details).

Details

Attempts to figure out a starting values for the means and covariances for use with other functions that do the EM algorithm such as em.prec or em.cov. Note that means are determined univariately using all available cases. For covariances, several options are available:

- "diag" Use all available complete values to compute the variances of each variable and construct a diagonal covariance matrix. - "pairwise" Pairwise (co)variances will be used to construct the starting covariance matrix. - "listwise" Listwise deletion will be used and only those with complete data will contribute to the starting covariance matrix. - "full" Cheat and use lavaan to obtain direct maximum likelihood estimates of covariances. This defeats the purpose to some extent, but not that lavaan may be quite slow compared to this implementation.

Value

A list consisting of:

Examples


  library(psych)
  data(bfi)
  startvals.cov(bfi[,1:25])


[Package EMgaussian version 0.2.1 Index]