Announcement

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

  • Decomposition of the variance explained by each variable in a multivariate analysis

    Hello everyone,

    I'm working on a multivariate analysis in Stata and I'm looking to determine the contribution of each independent variable to the explained variance of the dependent variable. My goal is to understand how much of the total variance of the dependent variable each individual predictor explains.

    Here is my command :

    Code:
    regress REMFULL_w gender_code centPERF c.centPERF#i.gender_code LnSIZE BM_w leverageratio_w LOSS LEGAL  Outsideinvestorprotection GDPpercapitagrowth UNEMPL CORRUP i.I i.chiffres, vce(robust)
    My variables of interest are gender_code centPERF and their interaction (c.centPERF#i.gender_code). I'd like to know how they contribute to the model.

    Is it the gender_code variable that explains more variance in the dependent variable? or centPERF? or their interaction?

    Do you have any methods for achieving this goal?

    Thank you very much

  • #2
    pcorr should work.

    Code:
    sysuse auto, clear
    
    reg price mpg weight foreign
    pcorr price mpg weight foreign
    ** note partial r2 of weight is 0.3012
    
    ** Now make the direct calculation as a check
    
    reg price mpg weight foreign
    local fullr2 = e(r2)
    
    reg price mpg foreign
    di "Partial R2 (weight) = " %5.4f (`fullr2' - e(r2))/(1 - e(r2))
    ** note partial r2 of weight is 0.3012

    Comment


    • #3
      Thank you very much for your reply.

      If I understand correctly, if I get 0.005 for the centPERF variable and 0.001 for the gender_code variable, I can conclude that it is the centPERF variable that contributes the most in the regression model. So it's centPERF that explains more variability in the dependent variable than gender_code?

      Comment


      • #4
        yes. as would be expected, I think.

        Comment

        Working...
        X