Announcement

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

  • Multiple imputation with panel data?

    I'm wondering about the best way to do multiple imputation (mi impute chained) with panel data. My goal is to compute a mixed effects model looking at the effect of an intervention on mental health over time, with interaction effects to test how the intervention differs by subgroup. Right now, I have two concerns: (1) my final model (below) won't compute the standard error of the random slope, and (2) I'm worried my imputation method is biasing the Time2 value to zero.

    Here is my approach to multiple imputation:

    Code:
    keep record_id week pos_asp_total memtot care_80plus delay age sex college income_binary white cbi_Dev pmhT ppaT
    mi set mlong
    mi xtset, clear
    mi misstable sum pos_asp_total memtot care_80plus delay age sex college income_binary white cbi_Dev pmhT ppaT
        // cbi_Dev pmhT ppaT = highly correlated with pos_asp
    mi reshape wide pos_asp_total cbi_Dev pmhT ppaT , i(record_id) j(week) // only for time-variant vars
    drop pmhT4 pmhT8 pmhT12 pmhT20 // we only have observations at T0 and T16
    mi register imputed pos_asp_total* memtot* care_80plus delay age sex college income_binary white cbi_Dev* pmhT* ppaT*
    mi impute chained (regress) pos_asp_total* memtot* age cbi_Dev* pmhT* ppaT* ///
                      (logit, augment) care_80plus delay sex college income_binary white, ///
                      add(50) rseed(12345) chaindots
                      
    mi reshape long pos_asp_total cbi_Dev pmhT ppaT, i(record_id) j(week)
    gen qweek = week*week
    mi xtset record_id week
    mi estimate: mixed pos_asp_total week qweek ||record_id: week , vce(robust)
    // results show qweek isn't significant at p <.05
    
    // full model using week but not qweek:
    mi estimate: mixed pos_asp_total (c.week)##(c.memtot c.care_80plus c.delay c.age ///
    c.sex c.college c.income_binary c.white) || record_id: week , vce(robust)



    My final model (in bold) isn't computing the standard error for the random slope, which makes me worry I've done something wrong.

    Below, I show the unconditional growth models, and then the full model.

    Code:
     mi estimate: mixed pos_asp_total week qweek ||record_id: week , vce(robust)
    
    Multiple-imputation estimates                   Imputations       =         50
    Mixed-effects regression                        Number of obs     =      1,002
    
    Group variable: record_id                       Number of groups  =        167
                                                    Obs per group:
                                                                  min =          6
                                                                  avg =        6.0
                                                                  max =          6
                                                    Average RVI       =     0.2134
                                                    Largest FMI       =     0.2587
    DF adjustment:   Large sample                   DF:     min       =     743.50
                                                            avg       =   5,263.93
                                                            max       =  22,119.19
    Model F test:       Equal FMI                   F(   2, 3075.0)   =      15.31
    Within VCE type:       Robust                   Prob > F          =     0.0000
    
                                (Within VCE adjusted for 167 clusters in record_id)
    -------------------------------------------------------------------------------
    pos_asp_total | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
             week |   .3013896   .0909797     3.31   0.001     .1229984    .4797808
            qweek |  -.0075897   .0042899    -1.77   0.077     -.016002    .0008226
            _cons |   25.96917   .7484187    34.70   0.000     24.50221    27.43612
    -------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects parameters  |   Estimate   Std. err.     [95% conf. interval]
    -----------------------------+------------------------------------------------
    record_id: Independent       |
                        sd(week) |   .1393417   .0732631      .0496371    .3911613
                       sd(_cons) |   7.830683   .4448212      7.005151      8.7535
    -----------------------------+------------------------------------------------
                    sd(Residual) |   4.841603   .2246497      4.420391    5.302952
    ------------------------------------------------------------------------------
    
    
    *** Since qweek (aka Time2) is only marginally significant, I try using only week (linear time). 
    
    . mi estimate: mixed pos_asp_total week ||record_id: week , vce(robust)
    
    Multiple-imputation estimates                   Imputations       =         50
    Mixed-effects regression                        Number of obs     =      1,002
    
    Group variable: record_id                       Number of groups  =        167
                                                    Obs per group:
                                                                  min =          6
                                                                  avg =        6.0
                                                                  max =          6
                                                    Average RVI       =     0.2112
                                                    Largest FMI       =     0.2368
    DF adjustment:   Large sample                   DF:     min       =     886.40
                                                            avg       =   3,194.79
                                                            max       =  10,400.25
    Model F test:       Equal FMI                   F(   1, 1287.8)   =      27.83
    Within VCE type:       Robust                   Prob > F          =     0.0000
    
                                (Within VCE adjusted for 167 clusters in record_id)
    -------------------------------------------------------------------------------
    pos_asp_total | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
             week |   .1495953   .0283557     5.28   0.000     .0939668    .2052238
            _cons |   26.37395   .6970041    37.84   0.000     25.00769    27.74021
    -------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects parameters  |   Estimate   Std. err.     [95% conf. interval]
    -----------------------------+------------------------------------------------
    record_id: Independent       |
                        sd(week) |   .1375319   .0792575      .0443811    .4261951
                       sd(_cons) |   7.830294   .4451679      7.004154    8.753877
    -----------------------------+------------------------------------------------
                    sd(Residual) |   4.855943   .2229362      4.437741    5.313555
    ------------------------------------------------------------------------------
    
    
    *** I then try my full model, which looks at how the linear growth differs by age, sex, etc.
    Notice the weird missing information (e.g., standard error of the random slope) in red. 
    
    . mi estimate: mixed pos_asp_total (c.week)##(c.memtot c.care_80plus c.delay c.age c.sex c.college c.income_binary c.whit
    > e) ||record_id: week , vce(robust)
    
    Multiple-imputation estimates                   Imputations       =         50
    Mixed-effects regression                        Number of obs     =      1,002
    
    Group variable: record_id                       Number of groups  =        167
                                                    Obs per group:
                                                                  min =          6
                                                                  avg =        6.0
                                                                  max =          6
                                                    Average RVI       =          .
                                                    Largest FMI       =          .
    DF adjustment:   Large sample                   DF:     min       =     261.67
                                                            avg       =          .
                                                            max       =          .
    Model F test:       Equal FMI                   F(  17,10006.2)   =       4.33
    Within VCE type:       Robust                   Prob > F          =     0.0000
    
                                         (Within VCE adjusted for 167 clusters in record_id)
    ----------------------------------------------------------------------------------------
             pos_asp_total | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -----------------------+----------------------------------------------------------------
                      week |   .1896886   .2223539     0.85   0.394    -.2480316    .6274089
                    memtot |  -.0148546   .0331565    -0.45   0.654    -.0798767    .0501674
               care_80plus |   -.800912   1.965325    -0.41   0.684    -4.654188    3.052364
                     delay |  -1.392745   1.342752    -1.04   0.300    -4.024856    1.239367
                       age |   .0448753   .0604383     0.74   0.458    -.0737715    .1635221
                       sex |  -4.149532   1.698719    -2.44   0.015     -7.47977   -.8192944
                   college |   -.598259   1.409668    -0.42   0.671    -3.361389    2.164871
             income_binary |  -1.384134   1.463121    -0.95   0.344    -4.252764    1.484495
                     white |  -3.688123   1.947044    -1.89   0.058    -7.505826    .1295793
                           |
           c.week#c.memtot |   .0013911   .0014019     0.99   0.321    -.0013595    .0041417
                           |
      c.week#c.care_80plus |   .0860559   .0764048     1.13   0.261    -.0643748    .2364867
                           |
            c.week#c.delay |   .0799039   .0581131     1.37   0.170    -.0343161    .1941239
                           |
              c.week#c.age |  -.0046516   .0023817    -1.95   0.052    -.0093397    .0000365
                           |
              c.week#c.sex |   .1674653   .0743649     2.25   0.025     .0210354    .3138951
                           |
          c.week#c.college |   .1086531   .0570293     1.91   0.057    -.0032943    .2206005
                           |
    c.week#c.income_binary |  -.0874567   .0709249    -1.23   0.219    -.2270465     .052133
                           |
            c.week#c.white |   -.069466   .0901648    -0.77   0.441    -.2464458    .1075138
                           |
                     _cons |   33.54938   5.188557     6.47   0.000     23.36598    43.73277
    ----------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects parameters  |   Estimate   Std. err.     [95% conf. interval]
    -----------------------------+------------------------------------------------
    record_id: Independent       |
                        sd(week) |   .0212806          .             .           .
                       sd(_cons) |   7.567774   .4906963      6.664248    8.593798
    -----------------------------+------------------------------------------------
                    sd(Residual) |    4.82774   .2709785      4.324656    5.389347
    ------------------------------------------------------------------------------
Working...
X