cvamEstimate: Obtain Estimated Probabilities from a Fitted Model

Description Usage Arguments Details Value Note 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 to obtain estimated marginal and conditional probabilities for model factors.

Usage

1
2
3
4
5
6
7
8
9
cvamEstimate(estimate, obj, meanSeries = TRUE,
   confidence = obj$control$confidence,
   probRound = obj$control$probRound, probDigits = obj$control$probDigits, ...)

## S3 method for class 'cvamEstimate'
print(x, showHeader = TRUE, ...)

## S3 method for class 'cvamEstimateList'
print(x, showHeader = TRUE, ...)

Arguments

estimate

a formula or list of formulas indicating the desired probabilities; see DETAILS.

obj

an object produced by cvam containing results from a model fit

meanSeries

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

confidence

confidence coefficient for asymmetric interval estimates; see DETAILS.

probRound

if TRUE, probabilities will be rounded.

probDigits

number of digits for rounding probabilities.

x

a set of estimates to be printed.

showHeader

if TRUE, a descriptive header is printed.

...

additional arguments to be passed to print.

Details

The argument estimate should be a one-sided formula or a list of one-sided formulas, with variables separated by '+', and variables to be conditioned on appearing after '|'. For example, ~ A requests marginal probabilities for every level of A; ~ A + B | C + D requests conditional probabilities for every level combination of A and B given every level combination of C and D.

A symmetric confidence interval for a probability may be problematic, especially if the estimate is close to zero or one. Asymmetric confidence intervals are computed by applying a normal approximation on the logistic (log-odds) scale and translating the endpoints back to the probability scale.

Value

if estimate is a single formula, this function returns a data frame containing estimated probabilities, standard errors, and endpoints of approximate confidence intervals. If estimate is a list of formulas, then a list of data frames is returned.

Note

Estimates may also be requested when fitting a model with cvam, by providing a formula or list of formulas to the optional argument estimate.

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 cvamPredict cvamImpute cvamLik

Examples

1
2
fit <- cvam( ~ Sex * PolViews * AbAny, data=abortion2000 )
cvamEstimate( list( ~ AbAny | Sex, ~ AbAny | PolViews ), fit )

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