predProbs
provides an easy way to analyze the estimated marginal
effect of an independent variable on the probability of particular outcomes,
using the estimates returned by a strategic model. The procedure is
designed so that, for a preliminary analysis, the user can simply specify
the fitted model and the independent variable of interest, and quickly
obtain plots of predicted probabilities. However, it is flexible enough to
allow for finely tuned analysis as well.The procedure works by varying x
, the variable of interest, across
its observed range (or one specified by the user in xlim
) while
holding all other independent variables in the model fixed. The profile
created by default is as follows (the same defaults as in the sim
function in the Zelig package):
- numeric, non-binary variables are fixed at their means
-
ordered
variables are fixed at their medians
- all others are fixed at their modes (see
Mode
)
However, it is possible to override these defaults for any or all
variables. For example, to set a variable named polity
to its lower
quartile, call predProbs
with the argument polity =
quantile(polity, 0.25)
. To set a factor variable to a particular level,
provide the name of the level as a character string (in quotes). (Also see
the examples below.)
Confidence intervals for each predicted point are generated by bootstrap.
If model
has a non-null boot.matrix
element (i.e., a bootstrap
was performed with the model fitting), then these results are used to
make the confidence intervals. Otherwise, a parametric bootstrap sample is
generated by sampling from a multivariate normal distribution around the
parameter estimates. In this case, a warning is issued.
For information on plotting the predicted probabilities, see
plot.predProbs
. The plots are made with base graphics. If you
prefer to use an alternative graphics package, all the information necessary
to make the plots is included in the data frame returned.