Announcement

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

  • Missing information and absence of standard errors in panel random effects using xtlogit on a multiple imputation sample

    Dear Statalist users,

    I would like to request your help.

    I am trying to fit a random effects panel logit regression with xtlogit in Stata 17 to a multiply imputed sample of 1,351 respondents observed twice each (2,702 observations in total, after multiple imputation). The panel dataset has two waves. All the respondents participated in both waves. My outcome variable is whether respondents are in a partnership with someone from the same country (1) or not (0). I impute most of the variables that I include in the models via multiple imputation through chained equations using predictive mean matching with the five nearest neighbours’ algorithm. I create 25 imputed datasets. The imputation process seems to run properly (no convergence errors or non-imputed missing values).
    I then run a so-called random effect between-within individuals model in which I compute for each continuous variable the mean over time for each individual and the wave-specific deviation from the individual mean. I use robust standard errors. This is the syntax that I use for the estimation:

    Code:
    mi estimate, post dots or: xtlogit currp_conat_v4_w M_neigown d_neigown M_activown_v2 ///
    d_activown_v2 M_hobbyown_v2 d_hobbyown_v2  ///
    i.currp_fam_w i.educ_mig M_income d_income i.religion M_religiosity d_religiosity ///
    M_discwomen d_discwomen M_discbar d_discbar i.residence_permit_w ///
    M_neigwomen d_neigwomen M_activwomen d_activwomen M_hobbywomen ///
    d_hobbywomen, re vce(robust)
    My problem is that Stata cannot estimate several of the parameters that report information about the imputation process (Average RVI, largest FMI) and the standard errors and confidence intervals of the variance, standard deviation and rho of the model (see results below). I don’t know why this happens, whether it is an indication that something went wrong or what can be done about this. Moreover, there is a variable in the model, currp_fam, for which Stata cannot estimate the standard errors, either. I am not sure why. I think this might be due to separation/perfect determination. I fit a very similar model without using robust standard errors, and all the parameters are estimated, but the standard errors of currp_fam are extremely large, as well as the bounds of confidence intervals (that is why I think separation might be an issue). I could drop this variable, but it is important from a theoretical standpoint.

    Could you please help me understand why Stata cannot estimate the parameters and their uncertainty indicators, what can be done about this and why there are differences between the model with and without robust std. errors?

    By the way, with xtreg there are no estimation problems, but the estimates are not the same (not very different, either, but enough to change the conclusions).

    Thank you very much for your time and help.

    Code:
    Imputations (25):
      .........10.........20..... done
    
    Multiple-imputation estimates                   Imputations       =         25
    Random-effects logistic regression              Number of obs     =      2,702
    
    Group variable: id                              Number of groups  =      1,351
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          2
    Integration points = 12                                       avg =        2.0
                                                                  max =          2
                                                    Average RVI       =          .
                                                    Largest FMI       =          .
    DF adjustment:   Large sample                   DF:     min       =       0.00
                                                            avg       =          .
                                                            max       =          .
    Model F test:       Equal FMI                   F(  24,19948.1)   =       0.88
    Within VCE type:       Robust                   Prob > F          =     0.6379
    
                                          (Within VCE adjusted for 1,351 clusters in id)
    ------------------------------------------------------------------------------------
      currp_conat_v4_w | Odds ratio   Std. err.      t    P>|t|     [95% conf. interval]
    -------------------+----------------------------------------------------------------
             M_neigown |   1.172268   .5030511     0.37   0.711     .5053929    2.719096
             d_neigown |   1.283729   .3812374     0.84   0.400     .7168937    2.298751
         M_activown_v2 |     1.4332   1.877755     0.27   0.784     .1099193      18.687
         d_activown_v2 |   1.015879   .2461109     0.07   0.948     .6317512    1.633569
         M_hobbyown_v2 |   2.227222   1.675927     1.06   0.287     .5096038    9.734067
         d_hobbyown_v2 |   .8127127   .2045653    -0.82   0.410      .495806    1.332178
                       |
           currp_fam_w |
                1.Yes  |   4.14e+08          .        .       .            .           .
                       |
              educ_mig |
     2.High education  |   2.636001   3.677618     0.69   0.487     .1711552    40.59769
            3.Missing  |   .8802779   2.028142    -0.06   0.956     .0096103    80.63129
                       |
              M_income |   1.001946   .0021045     0.93   0.355     .9978296    1.006079
              d_income |   .9999989   .0003513    -0.00   0.997     .9993082     1.00069
                       |
              religion |
             1.Muslim  |   2.122298   2.023869     0.79   0.430     .3273652    13.75879
         M_religiosity |   1.013978   .3767093     0.04   0.970     .4895406    2.100238
         d_religiosity |   1.121658   .2872541     0.45   0.654     .6784239     1.85447
           M_discwomen |   .7221087   .2865209    -0.82   0.412      .331734    1.571865
           d_discwomen |   .9090531   .1809278    -0.48   0.632      .614358    1.345107
             M_discbar |   1.103048   .6653122     0.16   0.871     .3381882    3.597748
             d_discbar |   1.294438   .2714507     1.23   0.219     .8574903    1.954039
                       |
    residence_permit_w |
                1.Yes  |   1.584619   1.329955     0.55   0.583     .3058449    8.210104
           M_neigwomen |   1.997191   2.479853     0.56   0.577     .1751849    22.76894
           d_neigwomen |   1.462784   .3685371     1.51   0.132     .8914152    2.400383
          M_activwomen |   1.240087   .3716118     0.72   0.473      .689174    2.231389
          d_activwomen |   1.216211    .285841     0.83   0.405     .7664404    1.929921
          M_hobbywomen |    .457416   .2854916    -1.25   0.210     .1345757    1.554734
          d_hobbywomen |   .8079163    .182769    -0.94   0.346      .518288    1.259394
                 _cons |   1.63e-07          .        .       .            .           .
    -------------------+----------------------------------------------------------------
              /lnsig2u |   4.426693          .                             .           .
    -------------------+----------------------------------------------------------------
               sigma_u |   9.146273          .                             .           .
                   rho |   .9621611          .                             .           .
    ------------------------------------------------------------------------------------
    Note: Estimates are transformed only in the first equation to odds ratios.
    Note: _cons estimates baseline odds (conditional on zero random effects).

  • #2
    Can you show us the imputation code? Do you impute in wide format?
    In any case, what happens when you estimate your command with the original dataset? What if you use just a single imputed dataset? Maybe imputation is not the problem (if perfect separation is present in the original data, imputation will neither help nor do harm).
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment


    • #3
      Thanks for your quick reply, Felix.

      I impute in wide format and then reshape the data file to long format to conduct the longitudinal analysis. This is the imputation code:

      Code:
      mimpt chained ///
          (pmm, knn(5))    currp_conat_v4_w1 ///
          currp_conat_v4_w2 ///
          religion ///
          residence_permit_w1 ///
          stay_w1 ///
          q5_2_w1 ///
          (pmm, knn(1) conditional(if participation == 2)) residence_permit_w2 ///
          stay_w2 ///
          (pmm, knn(5) conditional(if partner_w1 == 1)) currp_fam_w1 ///
       (pmm, knn(5) conditional(if partner_w2 == 1)) currp_fam_w2 ///
          (pmm, knn(5)) neighbor_prop_own_w1 neighbor_prop_own_w2 ///
          activity_prop_own_v2_w1 activity_prop_own_v2_w2 ///
          hobby_prop_own_v2_w1 hobby_prop_own_v2_w2 ///
          discr_women_w1 discr_women_w2 ///
          discr_bar_w1 discr_bar_w2 ///
          religiosity_w1 religiosity_w2 ///
          neighbor_prop_women_w1 neighbor_prop_women_w2 ///
          activity_prop_women_w1 activity_prop_women_w2 ///
          hobby_prop_women_w1 hobby_prop_women_w2 ///
          q16_1_1_w1 ///
          q16_1_2_w1 ///
          q16_1_3_w1 ///
          q16_1_4_w1 ///
          q16_1_5_w1 ///
          q16_1_6_w1 ///
          q16_1_7_w1 ///
          q16_1_8_w1 ///
          q16_1_9_w1 ///
          q16_1_10_w1 ///
          income_w1 ///
          q17_1_1_w1 ///
          q17_1_2_w1 ///
          q17_1_3_w1 ///
          q17_1_4_w1 ///
          q17_1_5_w1 ///
          q1_8_w1  ///
          q2_1_w1 ///
          (pmm, knn(5) conditional(if participation == 2)) nchildren_w2 ///
          income_w2 ///
          = $regular [pweight = gewicht1], ///
          noisily add(25) dots rseed(1359) augment skipnonconvergence(5)
      I tried running the analyses in the original non-imputed dataset and in single imputed datasets. Separation with "currp_fam" seems to be a problem in all. However, the non-estimation of the standard errors and confidence intervals of the variance, standard deviation and rho of the random effects model is an issue also in a "null" model that just contains the dependent variable. Therefore, I guess, separation is not the only problem.

      Despite the separation problem with currp_fam, can I still trust the coefficients and standard errors of the other variables in the model or are they "distorted" by the estimation problems with 'currp_fam'?

      Thanks for the replies!

      Comment


      • #4
        You are using the user-written command mimpt instead of mi impute chained, which means that your imputation probably has some convergence problems. You might want to check very carefully what happens and why the models fail. Maybe consider a less complex one.
        Anyways, this is maybe not the main source of the problem as the issue happens also with the original data. What happens if you simply omit the problematic variables for the estimation model? How do the other effects change? This is a test I would consider first.
        Best wishes

        Stata 18.0 MP | ORCID | Google Scholar

        Comment


        • #5
          Originally posted by Felix Bittmann View Post
          You are using the user-written command mimpt instead of mi impute chained, which means that your imputation probably has some convergence problems. You might want to check very carefully what happens and why the models fail. Maybe consider a less complex one.
          Anyways, this is maybe not the main source of the problem as the issue happens also with the original data. What happens if you simply omit the problematic variables for the estimation model? How do the other effects change? This is a test I would consider first.
          I am carrying over the mimpt command from previous sections of my do-file where I tried other imputation models that didn't work. The one that I show seems to work without errors or convergence problems. I use mimpt just for simplicity.

          I omitted the problematic variable and the coefficients of my core variables changed. This is not surprising, but expected. I expect currp_fam to be a confounder of the effect of my key variables: M_neigown, d_neigown, M_activown_v2, d_activown_v2 M_hobbyown_v2, and d_hobbyown_v2. When I omit currp_fam, the coefficients of these variables change.

          Besides separation, what other potential causes are there to explain why the standard errors of the variance, std. deviation and rho of the model are not calculated?

          Thanks for the replies.

          Comment

          Working...
          X