cvamEstimate | R Documentation |
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.
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, ...)
estimate |
a formula or list of formulas indicating the desired probabilities; see DETAILS. |
obj |
an object produced by |
meanSeries |
applies when |
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 |
... |
additional arguments to be passed to |
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
.
If obj
was produced with saturated=FALSE
and
method="EM"
, then standard errors for all
probabilities are computed using Taylor linearization, also known as
the delta method, based on the asymptotic covariance matrix for the
log-linear coefficients.
If obj
was produced with saturated=FALSE
and
method="MCMC"
or "approxBayes"
, then standard errors are
computed with Taylor
linearization, based on the covariance matrix for the simulated log-linear
coefficients from all iterations after the burn-in period.
If obj
was produced with saturated=TRUE
, then
standard errors are not computed.
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.
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.
Estimates may also be requested when fitting a model with cvam
,
by providing a formula or list of formulas to the optional argument
estimate
.
Joe Schafer Joseph.L.Schafer@census.gov
For more information, refer to the package vignette Log-Linear Modeling with Missing and Coarsened Values Using the cvam Package.
cvam
cvamPredict
cvamImpute
cvamLik
fit <- cvam( ~ Sex * PolViews * AbAny, data=abortion2000 ) cvamEstimate( list( ~ AbAny | Sex, ~ AbAny | PolViews ), fit )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.