Announcement

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

  • Interpreting the coefficients of continuous variables that add up to 1.

    Hi All,

    I have several variables that are probability distributions and add up to 1 for each observation in the data. I need to understand their effect on the y variable and the effect of their interaction with another variable on the y variable. Naturally, due to multicollinearity one variable gets omitted. But I was wondering how I can get the absolute effects of the remaining variables on y and not their relative effect compared to the base variable? Is regression the right command here?

    Here is an example of the data and the regression I ran. Is there a better way to do it? Thanks

    Note. This is just a small sample of the data. In the actual model all the regression coefficients are significant.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(match s1 s2 s3 s4 s5 s6 s7)
    0   .3460994 .027721884  .13671936  .01610375   .0610933  .28312692   .12913533
    0   .3460994 .027721884  .13671936  .01610375   .0610933  .28312692   .12913533
    1   .3460994 .027721884  .13671936  .01610375   .0610933  .28312692   .12913533
    0   .3460994 .027721884  .13671936  .01610375   .0610933  .28312692   .12913533
    1   .5539241  .05284388  .03633792  .03319973   .2360281 .063417144  .024249103
    1   .5539241  .05284388  .03633792  .03319973   .2360281 .063417144  .024249103
    0   .6570255 .036838613  .05214004  .04574493  .05147457  .12663722  .030139146
    1 .013406474  .18027425   .0109993   .4699277  .06300615  .25860816 .0037779266
    0 .013406474  .18027425   .0109993   .4699277  .06300615  .25860816 .0037779266
    0 .013406474  .18027425   .0109993   .4699277  .06300615  .25860816 .0037779266
    0 .013406474  .18027425   .0109993   .4699277  .06300615  .25860816 .0037779266
    1 .013406474  .18027425   .0109993   .4699277  .06300615  .25860816 .0037779266
    0  .15467495  .08611204    .045628  .02153469  .02789844   .6537193  .010432558
    0  .06370333  .08946704  .08496979   .0487665  .17212933  .52354944  .017414518
    0 .012380335  .16579816 .066824265   .6737679   .0396522  .03621046  .005366755
    1  .06173988  .09393571  .08600269   .4009326  .14289093   .2014528  .013045325
    0  .13768885  .05527736   .0304386   .3585848  .07155494   .3238893   .02256625
    1  .06458115  .07427485 .019308556 .017721914 .027829833   .7873161 .0089675365
    1  .12003846   .1074243 .036140695 .020502416  .06294252   .6122155   .04073614
    0  .12003846   .1074243 .036140695 .020502416  .06294252   .6122155   .04073614
    0  .12003846   .1074243 .036140695 .020502416  .06294252   .6122155   .04073614
    1  .12003846   .1074243 .036140695 .020502416  .06294252   .6122155   .04073614
    1  .14501129   .3604236 .065053575  .19487804 .032834493  .19505844  .006740584
    1 .023974335   .1040186  .05212808  .04843142  .09168868    .660408  .019350866
    1  .15405595  .22129165 .036939427   .2469807   .2540746  .07606973   .01058795
    0  .15405595  .22129165 .036939427   .2469807   .2540746  .07606973   .01058795
    0  .15405595  .22129165 .036939427   .2469807   .2540746  .07606973   .01058795
    1 .031611577   .3102079  .05644951  .33804265   .1020544  .14395851  .017675396
    0 .031611577   .3102079  .05644951  .33804265   .1020544  .14395851  .017675396
    0   .0436806  .06067826 .027863804  .15405945  .47670835  .18908773   .04792177
    0  .09437981  .27568135  .09298646  .14368182  .19472598  .16256106  .035983514
    0  .18438485  .09991258  .18694967   .0696988  .06184335   .3724329   .02477783
    0  .20598033  .08718956  .22280735  .09161335  .05655546   .3132324  .022621604
    0  .20598033  .08718956  .22280735  .09161335  .05655546   .3132324  .022621604
    1  .02895806  .21619554   .3367783 .026219696 .024455775   .3308067  .036585942
    0  .02895806  .21619554   .3367783 .026219696 .024455775   .3308067  .036585942
    1  .08734536   .3152682  .06978373  .04414642  .09008084  .38663325    .0067422
    0  .08734536   .3152682  .06978373  .04414642  .09008084  .38663325    .0067422
    0  .08734536   .3152682  .06978373  .04414642  .09008084  .38663325    .0067422
    0  .08734536   .3152682  .06978373  .04414642  .09008084  .38663325    .0067422
    1   .0555354   .1625591  .01448311 .015016368  .13941652   .6029186  .010070948
    1  .04594205  .05656949  .04792921  .02780593  .10145205   .7156692 .0046321056
    1  .02265544    .103401   .1906227   .3333816  .12641534  .21374153  .009782427
    1  .05047486  .06725083 .066253655  .01939088  .03608024   .7519814   .00856818
    1  .03313155  .06483425  .07013627 .017308231  .04142455   .7661033  .007061889
    1  .06000235  .29063815   .2235921  .14244545   .2219228  .05470013   .00669902
    0  .06000235  .29063815   .2235921  .14244545   .2219228  .05470013   .00669902
    0   .6570255 .036838613  .05214004  .04574493  .05147457  .12663722  .030139146
    1  .06000235  .29063815   .2235921  .14244545   .2219228  .05470013   .00669902
    end
    
    reg y i.match##c.(s1-s6)
    Last edited by Monica Muller; 13 Feb 2022, 23:59.

  • #2
    Monica:
    you may want to try:
    Code:
    . reg y i.match##c.(s1-s6), nocons
    
          Source |       SS           df       MS      Number of obs   =        49
    -------------+----------------------------------   F(13, 36)       =     15.85
           Model |  16.6357325        13  1.27967173   Prob > F        =    0.0000
        Residual |  2.90709873        36  .080752742   R-squared       =    0.8512
    -------------+----------------------------------   Adj R-squared   =    0.7975
           Total |  19.5428313        49  .398833291   Root MSE        =    .28417
    
    ------------------------------------------------------------------------------
               y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
         1.match |  -2.018104   3.108876    -0.65   0.520    -8.323196    4.286988
              s1 |   -.077925    .299398    -0.26   0.796    -.6851322    .5292823
              s2 |    1.33362   .5723295     2.33   0.026     .1728818    2.494358
              s3 |  -.0052516   .6648184    -0.01   0.994    -1.353566    1.343063
              s4 |   .2950685   .3044567     0.97   0.339    -.3223982    .9125352
              s5 |   .6489311   .5351555     1.21   0.233    -.4364145    1.734277
              s6 |   .7077359   .2549769     2.78   0.009     .1906189    1.224853
                 |
      match#c.s1 |
              1  |   2.033292   3.583244     0.57   0.574    -5.233864    9.300447
                 |
      match#c.s2 |
              1  |   .4710116   3.152404     0.15   0.882    -5.922361    6.864384
                 |
      match#c.s3 |
              1  |   3.399068   3.698871     0.92   0.364     -4.10259    10.90073
                 |
      match#c.s4 |
              1  |   2.280554   3.231418     0.71   0.485    -4.273066    8.834174
                 |
      match#c.s5 |
              1  |    3.76506   2.873973     1.31   0.198    -2.063628    9.593748
                 |
      match#c.s6 |
              1  |   1.930866   3.188136     0.61   0.549    -4.534973    8.396706
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X