Announcement

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

  • XTREG output interpretation

    I am asking help to get a better understand of
    Code:
    xtreg
    output.
    I am using this command to model a regression where the dependent variable is a measure of both eyes function in a group of subjects and, therefore, there is the need to take into account the correlation that exists between the 2 eyes on a single subject.
    Absume the dependent variable name be 'meibo' to be regressed with 'age' and 'fabry' ( a 0/1 indicator of the presence of the Fabry disease) . After
    Code:
    xtset id
    , where 'id' identify each subject, running
    Code:
    xtreg meibo i.fabry##c.age, re
    gives the following output:
    Code:
    Random-effects GLS regression Number of obs = 372
    Group variable: id Number of groups = 186
    R-squared: Obs per group:
    Within = . min = 2
    Between = 0.8282 avg = 2.0
    Overall = 0.7918 max = 2
    Wald chi2(3) = 877.31
    corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
    meibo Coefficient Std. err. z P>z [95% conf. interval]
    1.fabry .611988 .0507753 12.05 0.000 .5124701 .7115058
    age .0052804 .0006747 7.83 0.000 .003958 .0066029
    fabry#c.age
    1 -.0035578 .0010202 -3.49 0.000 -.0055572 -.0015583
    _cons .0562077 .0337378 1.67 0.096 -.0099171 .1223325
    sigma_u .08600507
    sigma_e .07248841
    rho .58466635 (fraction of variance due to u_i)
    Questions:
    1) Is it correct to say that the intraclass correlation coefficient (ICC) adjusted for the covariates relative to the 2 eyes measurement is 0.91, the square root of the 'R-squared_Between' (0.8282) ?
    2) What relation exists (if any) between the named 'R-squared_Between' and 'rho', in the given example equal to .58466635?

    Thank a lot in advance for the time spent to help me understand.
    Best Regards.
    DF Vitale

  • #2
    1) No, the intraclass correlation is rho, in this case, .58 (to 2 decimal places).

    2) There is no relationship between R2-between and the intraclass correlation.

    Comment


    • #3
      Dino:
      as an aside to Clyde's helpful reply, as most of the patients have two eyes, you should cluster your standared errors on -id- if you collect right/left eye measures.
      In addition, please use CODE delimiters (as per FAQ) to share what yoiu typed and what Stata gave you back. Thanks.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you both for your helpful reply. Clyde answer cleared a doubt I had.
        As concerns the clustering on ‘id’ , I thought that ‘panelling’ on it and using xtreg would have correct for the eyes correlation in a single subject and ,hence, would have returned errors unbiased for the clustering.
        However, since it is actually available a cluster option for xtreg, I am probably wrong and I am missing something.
        Following I report the results obtained without an with cluster option.
        Code:
        . xtreg meibo i.fabry##c.age
        
        Random-effects GLS regression                   Number of obs     =        372
        Group variable: id                              Number of groups  =        186
        
        R-squared:                                      Obs per group:
        Within  =      .                                         min =          2
        Between = 0.8282                                         avg =        2.0
        Overall = 0.7918                                         max =          2
        
        Wald chi2(3)      =     877.31
        corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
        
        
        meibo  Coefficient  Std. err.      z    P>z     [95% conf. interval]
        
        1.fabry     .611988   .0507753    12.05   0.000     .5124701    .7115058
        age    .0052804   .0006747     7.83   0.000      .003958    .0066029
        
        fabry#c.age 
        1    -.0035578   .0010202    -3.49   0.000    -.0055572   -.0015583
        
        _cons    .0562077   .0337378     1.67   0.096    -.0099171    .1223325
        
        sigma_u   .08600507
        sigma_e   .07248841
        rho   .58466635   (fraction of variance due to u_i) 
        . xtreg meibo i.fabry##c.age ,re vce(cluster id) Random-effects GLS regression Number of obs = 372 Group variable: id Number of groups = 186 R-squared: Obs per group: Within = . min = 2 Between = 0.8282 avg = 2.0 Overall = 0.7918 max = 2 Wald chi2(3) = 1014.58 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 (Std. err. adjusted for 186 clusters in id) Robust meibo Coefficient std. err. z P>z [95% conf. interval] 1.fabry .611988 .0570159 10.73 0.000 .5002389 .723737 age .0052804 .0006299 8.38 0.000 .0040459 .006515 fabry#c.age 1 -.0035578 .0011651 -3.05 0.002 -.0058413 -.0012743 _cons .0562077 .0264396 2.13 0.034 .004387 .1080284 sigma_u .08600507 sigma_e .07248841 rho .58466635 (fraction of variance due to u_i)
        There are indeed standard errors differences (even if small) so it would be safer to use clustering option.
        Thank a lot again for the help

        Comment

        Working...
        X