getstartvals: Obtain starting values for maximum likelihood estimation.

View source: R/getstartvals.R

getstartvalsR Documentation

Obtain starting values for maximum likelihood estimation.

Description

Calculates the starting values to be passed to nlm for minimization of the negative log-likelihood for multivariate normal data with missing values. This function is private to mlest.

Usage

getstartvals(x, eps = 0.001)

Arguments

x

Multivariate data, potentially with missing values.

eps

All eigenvalues of the variance-covariance matrix less than eps times the smallest positive eigenvalue are set to eps times the smallest positive eigenvalue.

Details

Starting values for the mean vector are simply sample means. Starting values for the variance-covariance matrix are derived from the sample variance-covariance matrix, after setting eigenvalues less than eps times the smallest positive eigenvalue equal to eps times the smallest positive eigenvalue to enforce positive definiteness.

Value

A numeric vector, containing the mean vector first, followed by the log of the diagonal elements of the inverse of the Cholesky factor of the adjusted sample variance-covariance matrix, and then the elements of the inverse of the Cholesky factor above the main diagonal. These off-diagonal elements are ordered by column (left to right), and then by row within column (top to bottom).

See Also

mlest


mvnmle documentation built on March 7, 2023, 7:38 p.m.