REGO is a Stata module that decomposes R2 (share of explained variance) of an OLS model into contributions of (groups of) regressor variables with the help of Shapley or Owen values. The use of “groups” of regressor variables that belong to the same category (such as the variables that belong to a polynomial in age) reduces computational effort in comparison to “classical” Shapley decomposition without groupings. REGO includes a bootstrap option to obtain confidence intervals for the decomposition results.
In the example below, REGO is used to decompose the R2 of a wage regression. The dependent variable is the logarithm of gross hourly earnings of male employees in Germany in the year 2006 (data from the German Socio-Economic Panel).
The syntax uses the backslash (“\”) symbol to delimit groups of regressor variables. Without such groupings, REGO would compute Shapley values for the individual regressors, which would take very long due to the large number of variables; in fact, the force option would be required to tell REGO to start computing. The option (detail) requests the computation of within-group decomposition (Owen values). This would take a considerable amount of time if the number of variables in a group is large.
Computing the results and displaying the table took 0.4 seconds in Stata 11 on a desktop PC.