cvamlik: Likelihood of Observed Data Patterns

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

After fitting a log-linear model with cvam, the fitted model object may be passed to this function, along with a dataset that may contain missing or coarsened values, to compute the likelihood of each pattern of possibly incomplete or coarsened data for subset of variables, possibly conditioned upon another subset of variables

Usage

1
cvamLik(form, obj, data, meanSeries = TRUE)

Arguments

form

a formula indicating which variables to consider, and which variables to condition on, when computing the likelihood

obj

an object produced by cvam containing results from a model fit

data

data frame for computing the likelihood values, possibly different from the data used to fit the model contained in obj

meanSeries

applies when obj contains results from a simulation run. If TRUE, then the requested likelihood values are based on a running mean of cell probabilities over all iterations after the burn-in period. If FALSE, then the requested values are based only on the cell probabilities from the final iteration, and (assuming the run was sufficiently long, if MCMC) can be regarded as a single draw from their posterior distribution.

Details

For structural zeros, 0/0 is returned as 0. If any variables are being conditioned on in form, they must not contain any missing or coarsened values.

Value

A data frame containing the model variables, with a variable likVall holding the likelihood values

Author(s)

Joe Schafer Joseph.L.Schafer@census.gov

References

For more information, refer to the package vignette Log-Linear Modeling with Missing and Coarsened Values Using the cvam Package.

See Also

cvam, cvamEstimate, cvamImpute, cvamPredict

Examples

1
2
result <- cvam( ~ V1 * V2, freq=n, data=crime)
cvamLik( ~ V1 + V2, result, data=crime )

cvam documentation built on Oct. 18, 2021, 5:09 p.m.