Announcement

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

  • Way to obtain std.error of interaction term

    I have this linear regression with mixed effects but I have a problem with interpretation of coefficents:

    Code:
     
     xtmixed ild c.tempomesi##i.trattato || pid:, mle nolog variance   Mixed-effects ML regression                     Number of obs      =       143 Group variable: pid                             Number of groups   =        61                                                  Obs per group: min =         2                                                                avg =       2.3                                                                max =         6                                                   Wald chi2(3)       =     28.76 Log likelihood =  -550.1897                     Prob > chi2        =    0.0000  --------------------------------------------------------------------------------------                  ild |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval] ---------------------+----------------------------------------------------------------            tempomesi |   .3300396   .0657651     5.02   0.000     .2011423    .4589369           1.trattato |  -3.826831   4.163937    -0.92   0.358      -11.988    4.334336                      | trattato#c.tempomesi |                   1  |  -.2629648   .1021319    -2.57   0.010    -.4631397   -.0627899                      |                _cons |   20.78178   3.101511     6.70   0.000     14.70293    26.86063 --------------------------------------------------------------------------------------  ------------------------------------------------------------------------------   Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval] -----------------------------+------------------------------------------------ pid: Identity                |                   var(_cons) |   226.6245    44.9081      153.6852     334.181 -----------------------------+------------------------------------------------                var(Residual) |   43.09052   6.757185       31.6885    58.59517 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) =    96.58 Prob >= chibar2 = 0.0000
    Trattato is a binary variable, thus in a untreated group tempomesi is 0.3300396 and in treated group is 0.3300396-0.2629648. But which is the std.err. of treated coefficient? Can i obtain this in other way? Because i've tried in this way but i did not obtain the same coefficient:
    Code:
    . xtmixed ild tempomesi ||pid: if trattato==1, nolog variance mle
    
    Mixed-effects ML regression                     Number of obs      =        79
    Group variable: pid                             Number of groups   =        34
    
                                                    Obs per group: min =         2
                                                                   avg =       2.3
                                                                   max =         4
    
    
                                                    Wald chi2(1)       =      1.24
    Log likelihood = -289.09181                     Prob > chi2        =    0.2649
    
    ------------------------------------------------------------------------------
             ild |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
       tempomesi |   .0691339   .0620092     1.11   0.265    -.0524019    .1906696
           _cons |   16.94165   2.405656     7.04   0.000     12.22665    21.65665
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    pid: Identity                |
                      var(_cons) |   174.2725   45.38596      104.6043    290.3408
    -----------------------------+------------------------------------------------
                   var(Residual) |   27.01511   5.705192      17.85852    40.86654
    ------------------------------------------------------------------------------
    LR test vs. linear regression: chibar2(01) =    63.17 Prob >= chibar2 = 0.0000

  • #2
    The first code was this:
    Code:
    . xtmixed ild c.tempomesi##i.trattato || pid:, mle nolog variance 
    
    Mixed-effects ML regression                     Number of obs      =       143
    Group variable: pid                             Number of groups   =        61
    
                                                    Obs per group: min =         2
                                                                   avg =       2.3
                                                                   max =         6
    
    
                                                    Wald chi2(3)       =     28.76
    Log likelihood =  -550.1897                     Prob > chi2        =    0.0000
    
    --------------------------------------------------------------------------------------
                     ild |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ---------------------+----------------------------------------------------------------
               tempomesi |   .3300396   .0657651     5.02   0.000     .2011423    .4589369
              1.trattato |  -3.826831   4.163937    -0.92   0.358      -11.988    4.334336
                         |
    trattato#c.tempomesi |
                      1  |  -.2629648   .1021319    -2.57   0.010    -.4631397   -.0627899
                         |
                   _cons |   20.78178   3.101511     6.70   0.000     14.70293    26.86063
    --------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    pid: Identity                |
                      var(_cons) |   226.6245    44.9081      153.6852     334.181
    -----------------------------+------------------------------------------------
                   var(Residual) |   43.09052   6.757185       31.6885    58.59517
    ------------------------------------------------------------------------------
    LR test vs. linear regression: chibar2(01) =    96.58 Prob >= chibar2 = 0.0000

    Comment


    • #3
      The effect (with standard error confidence interval etc.) of grade for non-union members is the main effect of grade. The effect (with standard error, confidence interval, etc.) of grade for union members is returned by lincom.
      Code:
      webuse nlswork, clear
      xtmixed ln_w i.union##c.grade || id:
      lincom grade + 1.union#c.grade
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment


      • #4
        Thank you Maarten

        Comment

        Working...
        X