------------------------------------------------------------------------------- help for_grmargb08AUG2009 -------------------------------------------------------------------------------

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(#)savediffnobaseall match dots]where

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

Description

_grmargbis 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 ofstat.

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

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.

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

diffcomputes difference between current predictions and those that were saved.

nobasesuppresses inclusion of the base values of x in the output.

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

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

dotsrequests 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 Matricesr(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

diffoption is usedr(dmargci): saves confidence intervals for differences in marginal effects when

diffoption is used. Column 1 - 6 correspond to lower bounds, upper bounds for percentile normal approximation, and bias-corrected methods.

ExamplesTo 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