Log-Posterior Density for Incomplete Factor Data

DESCRIPTION:

Calculates the observed-data log-likelihood or log-posterior density for incomplete factor data modeled by a loglinear model, with a Dirichlet prior.

USAGE:

logpost.Loglin(object, theta = <<see below>>, prior = <<see below>>) 

REQUIRED ARGUMENTS:

object
an object of class "missmodel" whose paramIter component is of class "Loglin". I.e., an object resulting from the use of the mdLoglin, daLoglin, or emLoglin functions. Alternatively, a class "preLoglin" object.

OPTIONAL ARGUMENTS:

theta
the model cell probabilities. If not specified, these are obtained as the final estimates (the last row) in the paramIter component of a missmodel object. If a class "preLoglin" object is input, the cell probabilities must be specified.

This may be a "Loglin" object with multiple rows; then calculations are performed for each row, and a vector is returned.
prior
specifies Dirichlet prior hyperparameters. Supply either a character string, or an object of class "priorLoglin", or an array of hyperparameters.

Valid character strings are "ml" (maximum likelihood) or "noninformative". String matching is used, so the characters "m" or "n" are sufficient. The values of the hyperparameters changes 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 class "priorLoglin" object is created by routine priorLoglin.

See argument start for the order to use in specifying a vector of hyperparameters. If a single numeric value is input, its value is replicated for all cells in the table. The hyperparameters for a data dependent prior (following an independence model) can be generated using routine dataDepPrior. See for details.

The default value is "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).

Structural zeros must be coded as missing ( NA) when a vector of hyperparameters is input as argument prior.

VALUE:

the value of the observed-data log-likelihood or log-posterior density function at theta.

DETAILS:

This is the log-likelihood or log-posterior density that ignores the missing-data mechanism.

SEE ALSO:

, , , , .

EXAMPLES:

fit <- emLoglin(object = crime, margins = ~Visit.1+Visit.2) 
logpost.Loglin(fit)