Announcement

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

  • Standard error of the difference of coefficients

    Dear Statalist Members

    I run a regression where I compare the the evolution of a coefficient over a time period relative to the evolution of the coefficient of an other time period. What are the coefficients of these differences?

    Linear regression Number of obs = 1,456
    F(15, 181) = 46.18
    Prob > F = 0.0000
    R-squared = 0.4522
    Root MSE = .12453

    (Std. err. adjusted for 182 clusters in code)
    ----------------------------------------------------------------------------------
    | Robust
    ln_employment_~e | Coefficient std. err. t P>|t| [95% conf. interval]
    -----------------+----------------------------------------------------------------

    year#c.avg_GAP_c |
    2014 | -.1807587 .5320225 -0.34 0.734 -1.230523 .8690053
    2015 | .0920542 .410935 0.22 0.823 -.7187851 .9028935
    2016 | .7385884 .5160883 1.43 0.154 -.2797349 1.756912
    2017 | .5241659 .5402929 0.97 0.333 -.5419169 1.590249
    2018 | 1.125851 .6353221 1.77 0.078 -.1277395 2.379441
    2019 | .8788087 .61297 1.43 0.153 -.3306774 2.088295
    2020 | .8352193 .5538894 1.51 0.133 -.2576914 1.92813
    |
    avg_GAP_c | -6.701872 .6575281 -10.19 0.000 -7.999278 -5.404465
    _cons | -.2272959 .0148515 -15.30 0.000 -.2566003 -.1979915


    In this case the coefficient of 2019 vs. 2018 relative to 2014 vs. 2013 (base year in this regression) would be (0.8788087-1.125851-(-0.1807587))=-0.0662836. What would here be the standard error? Would be very thankful for your help.

    Have a great day.

    Félix

  • #2
    Félix:
    do you mean something along the lines of the following toy-example?
    Code:
    use "https://www.stata-press.com/data/r16/auto.dta"
    . reg price i.foreign i.rep78
    
          Source |       SS           df       MS      Number of obs   =        69
    -------------+----------------------------------   F(5, 63)        =      0.19
           Model |  8372481.37         5  1674496.27   Prob > F        =    0.9670
        Residual |   568424478        63  9022610.75   R-squared       =    0.0145
    -------------+----------------------------------   Adj R-squared   =   -0.0637
           Total |   576796959        68  8482308.22   Root MSE        =    3003.8
    
    ------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         foreign |
        Foreign  |    36.7572   1010.484     0.04   0.971    -1982.533    2056.048
                 |
           rep78 |
              2  |   1403.125   2374.686     0.59   0.557    -3342.306    6148.556
              3  |   1861.058   2195.967     0.85   0.400    -2527.232    6249.347
              4  |   1488.621   2295.176     0.65   0.519    -3097.921    6075.164
              5  |   1318.426   2452.565     0.54   0.593    -3582.634    6219.485
                 |
           _cons |     4564.5   2123.983     2.15   0.035     320.0579    8808.942
    ------------------------------------------------------------------------------
    
    . lincom i2.rep78-i3.rep78
    
     ( 1)  2.rep78 - 3.rep78 = 0
    
    ------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             (1) |  -457.9326   1199.496    -0.38   0.704    -2854.934    1939.069
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Carlo:

      Thank you so much, that is exactly, what I was looking for.

      Have a great Sunday.

      Félix

      Comment

      Working...
      X