| Previous: Algorithms for setx | Up: Formulae - A Peek | Next: References |
simqi simulates quantities of interest based on the
parameters that were generated by estsimp and the
-values
that were chosen with setx. The program obtains simulations
of the dependent variable and uses them to calculate expected values,
probabilities, first differences, and other quantities of interest.
This procedure works in all cases but involves some approximation
error, which users can make arbitrarily small by choosing a sufficient
number of simulations. In many cases, though, shortcuts exist that
can curtail both computation time and approximation error.
simqi employs such shortcuts whenever possible. Here, we
sketch the algorithms for each model that
larify supports.
regress: The exact algorithm in simqi
depends on whether the user has transformed the dependent variable
(e.g., taken the log of
) prior to estimation. If no such
transformation has occurred, the program generates one predicted value
according to the formula
, where
is a vector of simulated effect
coefficients and
is one draw from
. Likewise, the program simulates one expected
value as
. The algorithm becomes a
bit more complicated if the user transformed the dependent variable
prior to estimation, and would like to reverse the transformation when
interpreting the results. Let
represent a function, as identified
by the tfunc() option, that reverses the transformation. If
has been specified, the program simulates one predicted value
according to the formula
.
For an expected value, the program draws
values of
from
and then computes
, which is the average of
predicted values.
logit: The formula for
, the
simulated probability that the dependent variable
takes on a value
of 1, is
. To obtain one simulation of
, the program draws a number from the Bernoulli distribution with
parameter
.
probit: The formula for
, the
simulated probability that the dependent variable
takes on a value
of 1, is
where
is the c.d.f. of the
standard normal distribution. To obtain one simulation of
, the
program draws a number from the Bernoulli distribution with parameter
.
ologit: The exact formula depends on the number
of categories in the dependent variable. Suppose there are three
categories. Let
represent one simulated vector of effect
coefficients and let
and
stand for
draws of the cutpoints. To obtain one simulation of the probabilities
for each category
, the program calculates:
,
, and
. With these
results, the program can draw a predicted value,
, from a
multinomial distribution with parameters
,
,
, and
.
oprobit: The exact formula depends on the number
of categories in the dependent variable. Suppose there are three
categories. Let
represent one simulated vector of
effect coefficients and let
and
stand for draws of the cutpoints. To obtain one simulation of the
probabilities for each category
, the program
calculates
,
, and
. With
these results, the program can draw a predicted value,
,
from a multinomial distribution with parameters
,
,
, and
.
mlogit: The probability equation for the
nominal outcomes of the multinomial logit is
,
where one of the
outcomes is the base category, such that the
effect coefficients
for that category are set to zero.
With these results, the program can draw a predicted value,
, from a multinomial distribution with parameters equal to the
s and
.
poisson: The formula for the expected value
is
, and the probability that the
dependent variable takes on the integer value
is
. To obtain one predicted
value, the program draws
from a Poisson distribution with
parameter
. The Poisson simulator is adapted from Press,
et al. (1992), pp. 293-95.
nbreg: The formula for the expected value
is
, just as in the Poisson regression
model (Long 1997, pp. 230-33). The probability that the dependent
value takes on the integer value
can be simulated as
. simqi obtains
,
the ``overdispersion'' parameter, by drawing simulations of
and the other parameters from the multivariate normal
distribution and then calculating
. To obtain a
predicted value
, the program draws one number from a
poisson distribution with mean
, where
is simulated from a
gamma distribution with shape parameter
and scale
parameter
. When
, the gamma
simulator is based on the algorithm developed by Ahrens and Dieter, as
described in Ripley (1987, p. 88). For other values of
, the gamma simulator is based on the procedure by
Best, as described in Devroye (1986, p. 410).
sureg: As with regress, the algorithm
for interpreting the results of a sureg depends on whether
the user transformed the dependent variable. If the user estimated
the model without transforming the dependent variable, the program
generates one predicted value for equation
according to the
formula
, where
is a vector of simulated effect coefficients for
equation
and
is a simulated disturbance term
for that equation. Disturbances for all equations are drawn
simultaneously from a multivariate normal distribution with mean 0 and
variance matrix
, as obtained from the inverse Wishart.
Likewise, the program simulates one expected value for equation
as
. If the user has transformed
the dependent variable, let
represent the function that reverses
the transformation. The program simulates one predicted value for
equation
according to the formula
. For an expected value, the program draws
sets of disturbance terms from
and indexes them as
, where
marks the equation and
. Then, for each equation
the program computes
,
which is the average of
predicted values.
weibull: The algorithm depends on which metric,
proportional hazard (PH) or accelerated failure-time (AFT) metric, was
used at the estsimp stage. The expected value is defined as
.
In the AFT metric,
;
in the PH metric,
. The program
obtains simulations of the ancillary shape parameter
drawing by
and the other parameters from a multivariate normal
distribution and then calculating
. To obtain a predicted
value, the program draws one number from the Weibull distribution with
parameters
and
.