preCgm
and
missmodel
. A default method operates on matrices and data frames.
daCgm(object, ...)
"preCgm"
or
"missmodel"
.
margins
,
gauss
,
design
,
optData
,
prior
,
start
,
control
and
contrasts
.
Additional arguments are
possible. See the specific method for a list of all
possible arguments.
"missmodel"
is returned; see
for details.
daCgm
creates the data set
.Random.seed
if it does not already exist, otherwise its value is updated.
The
daCgm
function computes data augmentation estimates of the
parameters in a Conditional Gaussian Model. In this
algorithm Markov Chain Monte Carlo (MCMC) methods are used to (1)
iteratively simulate data for the missing values, and (2) simulate
parameters given the augmented data. Because data augmentation
results in a Markov chain, care must be taken to ensure that a steady
state solution has been reached. You can assess this from the
sequence of parameter iterates returned as the
paramIter
component
of the class
"missmodel"
object returned by the
daCgm
function. These may be analyzed using routines such as
plot.missmodel
, and
worstFunLin
.
The function
impCgm
may use the
missmodel
object produced by
daCgm
as starting
values to impute values for
the missing observations.
Because the
daCgm
function is often called more than once, it is
usually preferable to precompute many of the statistics used by
daCgm
by first calling the
preCgm
function.
Schafer, J. L. (1997), Analysis of Incomplete Multivariate Data, Chapman & Hall, London.
# See help file for emCgm.methods for creating language.em, # used as a starting value for the DA algorithm #Jeffreys prior with all hyperparameters = .5 (the default), language.da <- daCgm(language.em, control = list(niter = 1000, save = 100:1000)) # same as: daCgm.missmodel(language.em, control = list(niter = 1000, save = 100:1000)) # Same analysis using a data-dependent prior #page 369, Schafer: data dependent prior with hyperparameters #scaled to add to 50 dataDepend <- dataDepPrior(language.s, nPriorObs= 50, algorithm= "da") language.da <- daCgm(language.em, prior= dataDepend, control = list(niter = 1000, save = 100:1000))