Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Incremental R2

    Hello,

    I am conducting an analysis of how much variance in a share price can be explained by changes in 16 accounting variables. One of my outputs is presented below. I am considering presenting an incremental R2 for each explanatory variable.

    The incremental R2 is simply the difference between R2 from a regression using all 16 variables and R2 regression using 15 variables (excluding the variable that we are calculating the incremental R2 for)

    I have tried to calculate it manually but it is a little bit time-consuming as I need to do it for 16 variables across industries.

    I was wondering if somebody conducted the study using incremental R2 and know how to generate a nice list of variables and corresponding incremental R2s?




    Code:
          Source |       SS           df       MS      Number of obs   =    91,455
    -------------+----------------------------------   F(16, 91438)    =   6237.52
           Model |  3371191.93        16  210699.496   Prob > F        =    0.0000
        Residual |  3088719.95    91,438   33.779391   R-squared       =    0.5219
    -------------+----------------------------------   Adj R-squared   =    0.5218
           Total |  6459911.88    91,454  70.6356407   Root MSE        =     5.812
    
    ------------------------------------------------------------------------------
             prc |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            atpr |   -.030514   .0014333   -21.29   0.000    -.0333232   -.0277048
          capxpr |   .0325993   .0124087     2.63   0.009     .0082784    .0569201
           ceqpr |   .6497327   .0041183   157.77   0.000     .6416609    .6578044
            chpr |   .5618771   .0115592    48.61   0.000     .5392213     .584533
          cogspr |  -.3351217   .0136862   -24.49   0.000    -.3619466   -.3082968
           dvcpr |   1.698806   .0453667    37.45   0.000     1.609887    1.787724
         intanpr |   .1766914   .0059984    29.46   0.000     .1649346    .1884482
            ibpr |   .6382094   .0178205    35.81   0.000     .6032814    .6731373
         oancfpr |   .0359895    .002705    13.30   0.000     .0306877    .0412913
          revtpr |    .325594   .0136197    23.91   0.000     .2988996    .3522885
           spipr |  -.5048722   .0242737   -20.80   0.000    -.5524484   -.4572961
           xadpr |  -.1427368   .0308852    -4.62   0.000    -.2032714   -.0822022
           xrdpr |   1.516386   .0413511    36.67   0.000     1.435338    1.597434
          xsgapr |   -.332726   .0146801   -22.67   0.000    -.3614989   -.3039532
       revgrowpr |    .014171   .0023716     5.98   0.000     .0095227    .0188193
           ocipr |   .0423746   .0122841     3.45   0.001     .0182979    .0664513
           _cons |   2.273077   .0260565    87.24   0.000     2.222006    2.324147
    ------------------------------------------------------------------------------
    Thank you for taking your time to help me,

    Jakub

  • #2
    Here's a little loop that estimates a full regression, then compares that r-squared value to a regression without one of the predictors:

    Code:
    sysuse auto, clear
    local varlist16 "foreign turn weight"
    reg price foreign turn weight
    local r2_16 = `e(r2)'
    foreach var of local varlist16 {
        local varlist15: list varlist16 - var
        qui reg price `varlist15'
        local r2_`var' = `e(r2)'
        noi di "regression without `var' :  r-squared is `r2_`var''"
        noi di "difference between full regression & regression without `var' is " `r2_16'-`r2_`var''
        }
    Note that this is not a general solution. If you have factor variable notation (you do not in the example you provide), this won't work correctly.
    Last edited by Carole J. Wilson; 25 Jul 2018, 10:13. Reason: added note
    Stata/MP 14.1 (64-bit x86-64)
    Revision 19 May 2016
    Win 8.1

    Comment

    Working...
    X