[. rego] Linear regression with Shapley and Owen value decomposition of R-squared

[ PURPOSE ] [ EXAMPLE ] [ DOWNLOAD ] [ REFERENCES ] [ COMMENT ]

Purpose

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 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. rego has an implemented option to bootstrap the decomposition results in order to obtain percentile confidence intervals.

Example

In the example below, rego 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.

rego example

Download

rego 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

rego is written and maintained by Frank Huettner and Marco Sunder, University of Leipzig.

Download paper Huettner, F.; Sunder, M. (2011). "Decomposing R2 with the Owen value." Working paper 100, Faculty of Economics and Management Science, University of Leipzig.


Comment

This FBook part is open for comments/suggestions/bug reports etc.

Locations of visitors to this page

[ back to top ]


* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



upcoming event

Download presentation slidesPresentation slides