zelig()
given specified values of explanatory
variables established in setx()
. For classical maximum
likelihood models, sim()
uses asymptotic normal
approximation to the log-likelihood. For Bayesian models,
Zelig simulates quantities of interest from the posterior density,
whenever possible. For robust Bayesian models, simulations
are drawn from the identified class of Bayesian posteriors.
Alternatively, you may generate quantities of interest using
bootstrapped parameters.sim(object, x = NULL, ...)## S3 method for class 'default':
sim(object, x=NULL, x1=NULL,
num=c(1000, 100),
prev = NULL, bootstrap = FALSE, bootfn=NULL,
cond.data = NULL, ...)
zelig
.setx
.setx
), used to simulate first
differences and risk ratios. (Not available for conditional
prediction.)num
argument is omitted, sim
draws 1,000
simulations by if bootstrap = FALSE
(the default), or 100
simulations if bootstrap = TRUE
bootstrap = TRUE
and bootfn = NULL
,
sim
will sample boot
.s.out
varies by model. Use the
names
command to view the output stored in s.out
.
Common elements include:setx
values for the explanatory variables,
used to calculate the quantities of interest (expected values,
predicted values, etc.).setx
object used to simulate
first differences, and other model-specific quantities of
interest, such as risk-ratios.sim
, used to
replicate quantities of interest.zelig
, used to replicate analyses.x
.x
and x1
.
The difference is calculated by subtracting the expected values
given x
from the expected values given x1
. (If do not
specify x1
, you will not get first differences or risk
ratios.)sim
first imputes the uncensored values for $Y$ before
calculating the ATE. You may use the $
operator to extract any of the
above from s.out
. For example, s.out$qi$ev
extracts the
simulated expected values.
boot
.