.rego
Linear regression with Shapley and Owen decomposition of R-squared
![[. rego] Linear regression with Shapley and Owen value decomposition of R-squared](/assets/img/logo_rego.png)
Purpose
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 variables that belong to the same category (such as the variables that belong to a polynomial in age), computational effort is lower than in the “classical” Shapley decomposition without groupings.
has an implemented option to bootstrap the decomposition results in order to obtain percentile confidence intervals.
Example
In the example below,
is used to decompose the R2 of a wage regression. The backslash (“\”) symbol is used in the syntax to delimit groups of regressor variables. The option “(detail)” requests the computation of within-group decomposition. This would take a considerable amount of time if the number of variables in a group is large. The example below required 0.25 seconds computation time.
Download
is published under the terms and conditions of the GNU General Public License 3.* The program is still “in development”, and no warranty is provided regarding the “soundness” of results. If you encounter bugs, please report them.
In order to install the current version for Stata 9 or higher, execute the following commands in the command window:
. net from http://www.marco-sunder.de/stata/
. net install rego
Alternatively, download this zip file and place its content either into your working directory or into a different folder that you specify with the adopath command.
References
is written and maintained by Frank Huettner and Marco Sunder, University of Leipzig.
Huettner, F.; Sunder, M. (2012). “Axiomatic arguments for decomposing goodness of fit according to Shapley and Owen values.” Electronic Journal of Statistics, 6, 1239-1250. https://doi.org/10.1214/12-EJS710
@article{HueSun2012EJS,
author = {Frank Huettner and Marco Sunder},
title = {Axiomatic arguments for decomposing goodness of fit
according to Shapley and Owen values},
journal = {Electronic Journal of Statistics},
volume = {6},
pages = {1239--1250},
year = {2012},
doi = {10.1214/12-EJS710}
}