logpost.cgm(object, theta = <<see below>>, prior = 1)
"missmodel"
whose
parameters
component is of
class
"cgm"
. I.e., an object resulting from the use of the
mdCgm
,
daCgm
, or
emCgm
functions. Alternatively, a class
"preCgm"
object.
paramIter
component
of the input
missmodel
object. If a class
"preCgm"
object is
input, the model parameters must be specified exactly as in a class
"cgm"
object (see
).
"cgm"
object with multiple rows; then calculations
are performed for each row, and a vector is returned.
"priorLoglin"
, or a vector of hyperparameters. The vectors length
equals the number of
cells formed by the factors modeled by a loglinear model.
"ml"
(maximum likelihood),
"noninformative"
, and
"data.dependent"
. String matching is used,
so the characters
"m"
,
"n"
, or
"d"
are sufficient. The values
of the hyperparameters change with the algorithm (see
for details). E.g.
"noninformative"
means a common value of 1 for
EM, and a common value of 0.5 for DA.
A data dependent prior (following an independence model) can also be
generated using routine
dataDepPrior
. See
for details.
"priorLoglin"
object is created by routine
priorLoglin
.
This routine allows you to easily specify data dependent priors.
"noninformative"
. When a class
"missmodel"
object is input, any value specified in a previous call has priority
over the default value (but not over any currently specified value).
NA
) when a vector of
hyperparameters is input as argument
prior
.
"missmodel"
object is input and argument
prior
is not
given, then argument
prior
defaults to the prior probabilities
specified in the
call
statement of the input
"missmodel"
object. If these are not specified, then the default (which depends on
the algorithm) is used.
theta
.
This is the log-likelihood or log-posterior density that ignores the missing-data mechanism.
fit <- emCgm(object = stlouis[,-1], margins = ~D1:D2+risk, gauss = ~verbal1+verbal2, design = ~D1+D2+risk, subset = verbal2 > 100 | is.na(verbal2)) logpost(fit) logpost.cgm(fit) #same