preGauss
and
missmodel
. A default method operates on matrices and data frames.
emGauss(object, ...)
"preGauss"
or
"missmodel"
.
prior
,
start
, and
control
which affect the EM algorithm. Additional arguments are
possible. See the specific function called for a list of all possible
arguments.
"missmodel"
is returned; see
for details.
The
emGauss
function computes estimates of the parameters in a
multivariate normal model.
emGauss
handles missing values by using
the EM algorithm to compute the modes of the posterior probability
distribution of the estimates given the specifed normal inverse
Wishart prior (when a noninformative prior is used, maximum likelihood
estimates are computed).
Given the results from the EM algorithm, missing values can be imputed
with the
impGauss
function.
Because the
emGauss
function is often called more than once, it is
usually preferable to precompute quantities used by
emGauss
. This may be done using the
preGauss
function.
Schafer, J. L. (1997), Analysis of Incomplete Multivariate Data, Chapman & Hall, London.
emGauss(object = cholesterol) # same, but first create preGauss object for greater efficiency cholesterol.pre <- preGauss(cholesterol) emGauss(cholesterol.pre) emGauss.preGauss(cholesterol.pre) # same # repeat, use final estimates in cholesterol.em as starting values cholesterol.em <- emGauss(cholesterol.pre) emGauss(cholesterol.em) emGauss.missmodel(cholesterol.em) # same