Announcement

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

  • linear mixed models with 2 time points

    Hi all,
    I am studying the effect of the exposure to air pollution on brain volumes. Air pollution was assessed at baseline and brain volumes at baseline and 5 years later.
    Am I right with doing a linear mixed models (with only 2 time points for the outcome?) or would it be better to do a classic linear regression with the delta between the brain volume at year 0 and at year 5.
    I think mixed models are more appropriate here, that's what I would do with more than 2 time points and repeated data over time but I am a bit confused here with only 2 time points.
    Thank you for your advice,
    Best regards,
    Nick S

  • #2
    Nick:
    you could also consider a panel data regression with -re- specification:
    Code:
    . use "https://www.stata-press.com/data/r17/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . xtreg ln_wage c.age##c.age, mle vce(cluster idcode)
    
    Fitting constant-only model:
    Iteration 0:   log likelihood =  -12878.37
    Iteration 1:   log likelihood = -12864.036
    Iteration 2:   log likelihood = -12863.892
    Iteration 3:   log likelihood = -12863.892
    
    Fitting full model:
    Iteration 0:   log likelihood = -11322.802
    Iteration 1:   log likelihood = -11264.949
    Iteration 2:   log likelihood = -11264.776
    Iteration 3:   log likelihood = -11264.776
    
    Random-effects ML regression                        Number of obs    =  28,510
    Group variable: idcode                              Number of groups =   4,710
    
    Random effects u_i ~ Gaussian                       Obs per group:
                                                                     min =       1
                                                                     avg =     6.1
                                                                     max =      15
    
                                                        Wald chi2(2)     = 1261.77
    Log likelihood = -11264.776                         Prob > chi2      =  0.0000
    
                                 (Std. err. adjusted for 4,710 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0592303   .0041053    14.43   0.000     .0511842    .0672765
                 |
     c.age#c.age |  -.0006789   .0000688    -9.87   0.000    -.0008137   -.0005441
                 |
           _cons |    .545105   .0587335     9.28   0.000     .4299895    .6602205
    -------------+----------------------------------------------------------------
        /sigma_u |    .357561   .0048399                      .3481996     .367174
        /sigma_e |   .3031159   .0036457                       .296054    .3103463
             rho |   .5818521   .0092125                      .5637158    .5998159
    ------------------------------------------------------------------------------
    
    
    . mixed ln_wage c.age##c.age,vce(cluster idcode)|| idcode:
    
    Performing EM optimization ...
    
    Performing gradient-based optimization: 
    Iteration 0:   log pseudolikelihood = -11264.776  
    Iteration 1:   log pseudolikelihood = -11264.776  
    
    Computing standard errors ...
    
    Mixed-effects regression                        Number of obs     =     28,510
    Group variable: idcode                          Number of groups  =      4,710
                                                    Obs per group:
                                                                  min =          1
                                                                  avg =        6.1
                                                                  max =         15
                                                    Wald chi2(2)      =    1266.75
    Log pseudolikelihood = -11264.776               Prob > chi2       =     0.0000
    
                                 (Std. err. adjusted for 4,710 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0592303   .0040999    14.45   0.000     .0511946    .0672661
                 |
     c.age#c.age |  -.0006789   .0000687    -9.88   0.000    -.0008135   -.0005442
                 |
           _cons |    .545105   .0586349     9.30   0.000     .4301826    .6600274
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
                                 |               Robust           
      Random-effects parameters  |   Estimate   std. err.     [95% conf. interval]
    -----------------------------+------------------------------------------------
    idcode: Identity             |
                      var(_cons) |   .1278498   .0034804      .1212072    .1348566
    -----------------------------+------------------------------------------------
                   var(Residual) |   .0918793   .0022077      .0876526    .0963098
    ------------------------------------------------------------------------------
    
    .
    The acceptability of the "two-point in time only" issue mostly depends on tribal rules in your research field.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you, Carlo! I will look at this more deeply.
      Best regards,
      Nick

      Comment

      Working...
      X