help for grdigap                                            - v001 28feb2011 jx

Difference in group averaged predicted prob in binary regressions

grdigap [if] [in] [, level(#) reps(#) size(#) group(grpvar_g0value_g1value) dots]


After estimating a binary regression model, grdigap computes the difference in group averaged predicted probabilities with the bootstrap method for statistical inference (only percentile method available as it is programmed now).


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.

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.

group identifies a group indicator variable. After the group variable, specify the value for the group 0, then the value for group 1 of the group variable. This program takes a difference of (average probability g1- average probability g0).

Returned Matrices

r(gavgdipmat): saves differences in group averaged predicted probabilities and their confidence intervals


To compute the difference in group averaged predicted probabilities between blacks and whites and and its confidence intervals using the bootstrap method after a logit model,

.logit vote black educ income

.grdigap, group(black 0 1) reps(1000) dots



Authors: Jun Xu