-------------------------------------------------------------------------------
help for _grmargb                                                     08AUG2009
-------------------------------------------------------------------------------

Marginal effects and their differences from binary regressions using bootstrap > method for inference

_grmargb [if] [in] [, x(variables_and_values) rest(stat) level(#) reps(#) size(#) save diff nobase all match dots]

where variables_and_values is an alternating list of variables and either numeric values or mean, median, min, max, upper, lower, previous and stat is either mean, median, min, max, upper, lower, previous, grmean(group mean), mrmedian, grmin, grmax.

Description

_grmargb is a command that returns marginal effects, differences in marginal effects and their confidence intervals using bootstrap method with resampling technique. It can calculate boostrapped confidence intervals using the normal approximation, percentile, and bias-corrected methods.

Options

x(variables_and_values) sets the values of independent variables for calculating predicted values (marginal effects). The list must alternate variable names and either numeric values or types of stat.

rest(stat) sets the independent variables not specified in x(variables_and_values) to one of the types of stat.

level() sets the level of the confidence interval for differences in group average marginal effects. The default is 95.

reps(#) specifies the number of bootstrap replications to be performed. The default is 1000.

size(#) specifies the size of the samples to be drawn. The default is e(N), the same size as the estimation sample.

save saves current values of independent variables and predictions for computing changes using the diff option.

diff computes difference between current predictions and those that were saved.

nobase suppresses inclusion of the base values of x in the output.

all specifies that any calculation of means, medians, etc., should use the entire sample instead of the sample used to estimate the model.

match requests grmargb to resample from each category group of the dependent variable in proportion of the resample size to the original sample size.

dots requests a dot be placed on the screen at the beginning of each replication, thus providing entertainment when a large number of reps() are requested. It also prints out the percent replications finished.

Returned Matrices

r(marg): saves marginal effects.

r(margci): saves confidence intervals for marginal effects. Column 1 - 6 correspond to lower bounds, upper bounds for percentile normal approximation, and bias-corrected methods.

r(margvar): saves variance-covariance matrix for marginal effects

r(margse): saves standard errors for marginal effects

r(dmarg): saves differences in marginal effects when diff option is used

r(dmargci): saves confidence intervals for differences in marginal effects when diff option is used. Column 1 - 6 correspond to lower bounds, upper bounds for percentile normal approximation, and bias-corrected methods.

Examples

To compute the predicted marginal effects, differences in marginal effects, and their confidence intervals using bootstrap method for a logit model. All independent variables are held at their means except for black and education specifed in x().

.logit vote black educ income

.grmargb, x(black=1 educ=16) save

.grmargb, x(black=0 educ=16) diff

:::

-------------------------------------------------------------------------------

Authors: Jun Xu