| Previous: The Main Commands | Up: The Main Commands | Next: setx |
Format:
estsimp modelname depvar [indepvars] [weight] [if exp] [in range]
[, sims(m) genname(newvar) antisim mi(file1 file2 ... filek) iout dropsims]
Description:
estsimp estimates a variety of statistical models and
generates
simulations of each parameter. Currently supported
models include regress, logit, probit, ologit, oprobit, mlogit,
poisson, nbreg. weibull, sureg, and the additive normal model for
compositional data. The simulations are stored in new variables
bearing the names
, where
is
the number of parameters. Each variable has
observations
corresponding to the
simulations. estsimp labels the
simulated variables and lists their names on the screen, so you can
verify what was simulated. The estsimp command accepts nearly all
options that are typically available for the supported models. It also
accepts several special options that are described below.
Options:
Examples:
To estimate a linear regression of
on
,
,
, and a
constant term; simulate 1000 sets of parameter estimates; and then
save the simulations as
,
, ...,
, type:
. estsimp regress y x1 x2 x3
In this example, Stata will create five new variables. The variables
,
and
will contain simulated coefficients for
,
and
;
will hold simulations of the constant term; and
will contain simulated values for sigma squared, the mean squared
error of the regression.
To simulate 500 sets of parameters from a logit regression and save the results as variables beginning with the letter ``s'', type:
. estsimp logit y x1 x2 x3, sims(500) genname(s)
Since the logit model contains no ancillary parameters, this command
will generate four new variables:
,
,
, and
.
Variables
-
are simulated coefficients for
,
and
, and the final variable,
, is the simulated constant term.
To simulate 1000 sets of parameters from an ordered probit regression in which the dependent variable can assume three values (low, medium, and high), type:
. estsimp oprobit y x1 x2 x3
The ordered probit model does not contain a constant term, but it does
have ancillary parameters called cut-points. Thus, the estsimp
command listed above will generate five new variables. The variables
,
and
will hold simulated coefficients for
and
. Variables
and
will contain simulations for the two
cutpoints (cut1 and cut2).
To obtain antithetical variates, simply use the antisim option, as in
. estsimp oprobit y x1 x2 x3, antisim
Suppose that we have three imputed datasets, called imp1.dta, imp2.dta, and imp3.dta. We could analyze all three datasets and combine the results by issuing the following command:
. estsimp oprobit y x1 x2 x3, mi(imp1 imp2 imp3)
The resulting simulations of the main and ancillary parameters would reflect both estimation uncertainty and the variability associated with the multiple imputations.
To view the intermediate output from each ordered probit estimation, add the iout option to the previous command, as in
. estsimp oprobit y x1 x2 x3, mi(imp1 imp2 imp3) iout