mlest2: ML Estimation of Multivariate Normal Data

View source: R/mlest2.R

mlest2R Documentation

ML Estimation of Multivariate Normal Data

Description

Finds the Maximum Likelihood (ML) Estimates of the mean vector and variance-covariance matrix for multivariate normal data with (potentially) missing values.

If the solution does not converge within the iterlim range specified by the mlest() function of the mvnmle package, this function calculates the solution by multiplying iterlim by 10 and recalculating until a solution is obtained. To avoid an infinite loop, the number of calculations is limited to max_iterlim.

Usage

mlest2(data, iterlim = 10000, max_iterlim = 1e+05, ...)

Arguments

data

A data frame or matrix containing multivariate normal data. Each row should correspond to an observation, and each column to a component of the multivariate vector. Missing values should be coded by 'NA'.

iterlim

a positive integer specifying the maximum number of iterations to be performed before the program is terminated.

max_iterlim

Numeric. Upper limit of the number of iterations to avoid infinite loops.

...

Optional arguments to be passed to the nlm optimization routine.

Details

The estimate of the variance-covariance matrix returned by mlest is necessarily positive semi-definite. Internally, nlm is used to minimize the negative log-likelihood, so optional arguments mayh be passed to nlm which modify the details of the minimization algorithm, such as iterlim. The likelihood is specified in terms of the inverse of the Cholesky factor of the variance-covariance matrix (see Pinheiro and Bates (2000, ISBN:1441903178)).

mlest cannot handle data matrices with more than 50 variables. Each varaible must also be observed at least once.

Value

muhat

Maximum Likelihood Estimation (MLE) of the mean vector.

sigmahat

MLE of the variance-covariance matrix.

value

The objective function that is minimized by nlm. Is is proportional to twice the negative log-likelihood.

gradient

The curvature of the likelihood surface at the MLE, in the parameterization used internally by the optimization algorithm. This parameterization is: mean vector first, followed by the log of the diagonal elements of the inverse of the Cholesky factor, 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).

stop.code

The stop code returned by nlm.

iterations

The number of iterations used by nlm.

References

Little, R. J. A., and Rubin, D. B. (1987) Statistical Analysis with Missing Data. New York: Wiley, ISBN:0471802549.

Pinheiro, J. C., and Bates, D. M. (1996) Unconstrained parametrizations for variance-covariance matrices. Statistics and Computing 6, 289–296, doi:10.1007/BF00140873.

Pinheiro, J. C., and Bates, D. M. (2000) Mixed-effects models in S and S-PLUS. New York: Springer, ISBN:1441903178.

See Also

nlm mlest

Examples

library(mvnmle)

data(apple)
mlest(apple)

data(missvals)
mlest(missvals, iterlim = 400)

indenkun/infun documentation built on April 17, 2025, 2:52 p.m.