Announcement

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

  • Compare restricted and full model that are pooled and p-weighted

    Dear All!

    The issue I want to solve is: I have two data points in time, whereas in 8% not the same person (household head) answered all questions but rather the child was the respondent in the second wave. Assuming that this is not a problem as characteristics are inherited from one generation to another, I believe to simply match these two waves. However, I need to also statistically test for this.
    Therefore, I want to statistically compare a restricted model (only household heads responded both) with the full model. Now I am puzzled because they are pooled in nature (thus use clustering) and are sample weighted, which does not allow me to use "suest" and the Hausman test.

    Would like to do:
    Code:
    mlogit PortfolioDecision  $x1 if SamePerson==1 [pweight=pweight], b(1) nolog
    margins, dydx(*)
    estimates store restricted
    
    mlogit PortfolioDecision  $x1 [pweight=pweight], b(1) nolog
    margins, dydx(*)
    estimates store full
    
    suest full restricted, vce(cluster hhid)  noomitted
    
    test [full_0=restricted_0], cons
    But the suest command does not allow for both clustering and pweights:
    PHP Code:
    suest full restrictedvce(cluster hhid)  noomitted
    model full was estimated with pweights
    you should re-estimate using iweights
    r
    (322);

    end of do-file 
    Does anyone know what I can do instead? Would it also be possible to run the commands above with (1) unweighted but clustered and (2) weighted but not-clustered data and still get at least a good approximate for a statistical difference between the two?
    Any help is highly appreciated!

    Thanks

  • #2
    I would just expand the observations and drop the probability weights. Example:

    Code:
    webuse sysdsn1
    set seed 01212021
    gen pw= runiformint(1, 5)
    *WITH PROBABILITY WEIGHTS
    mlogit insure age male nonwhite i.site [pweight= pw], b(1) nolog
    preserve
    *EXPAND OBS
    expand pw
    mlogit insure age male nonwhite i.site, b(1) nolog
    restore
    Res.:

    Code:
    . *WITH PROBABILITY WEIGHTS
    
    . 
    . mlogit insure age male nonwhite i.site [pweight= pw], b(1) nolog
    
    Multinomial logistic regression                 Number of obs     =        615
                                                    Wald chi2(10)     =      24.98
                                                    Prob > chi2       =     0.0054
    Log pseudolikelihood = -1629.6254               Pseudo R2         =     0.0298
    
    ------------------------------------------------------------------------------
                 |               Robust
          insure |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    Indemnity    |  (base outcome)
    -------------+----------------------------------------------------------------
    Prepaid      |
             age |  -.0095502   .0067665    -1.41   0.158    -.0228122    .0037119
            male |    .295541   .2202639     1.34   0.180    -.1361683    .7272504
        nonwhite |    .928286   .2628762     3.53   0.000     .4130582    1.443514
                 |
            site |
              2  |   .1858761   .2324204     0.80   0.424    -.2696595    .6414116
              3  |  -.4475149   .2523063    -1.77   0.076    -.9420261    .0469963
                 |
           _cons |   .1372069   .3572138     0.38   0.701    -.5629193     .837333
    -------------+----------------------------------------------------------------
    Uninsure     |
             age |   .0006181   .0122265     0.05   0.960    -.0233453    .0245815
            male |   .2341683   .3967306     0.59   0.555    -.5434093    1.011746
        nonwhite |   .3329798   .4529042     0.74   0.462    -.5546961    1.220656
                 |
            site |
              2  |  -1.126122   .5162875    -2.18   0.029    -2.138027   -.1142168
              3  |  -.2055748   .3991142    -0.52   0.606    -.9878242    .5766747
                 |
           _cons |  -1.740114   .6778017    -2.57   0.010    -3.068581   -.4116476
    ------------------------------------------------------------------------------
    
    
    . 
    . *EXPAND OBS
    
    . 
    . expand pw
    (1,322 observations created)
    
    . 
    . mlogit insure age male nonwhite i.site, b(1) nolog
    
    Multinomial logistic regression                 Number of obs     =      1,877
                                                    LR chi2(10)       =     100.08
                                                    Prob > chi2       =     0.0000
    Log likelihood = -1629.6254                     Pseudo R2         =     0.0298
    
    ------------------------------------------------------------------------------
          insure |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    Indemnity    |  (base outcome)
    -------------+----------------------------------------------------------------
    Prepaid      |
             age |  -.0095502   .0035496    -2.69   0.007    -.0165072   -.0025931
            male |    .295541   .1134714     2.60   0.009     .0731411    .5179409
        nonwhite |    .928286   .1345234     6.90   0.000      .664625    1.191947
                 |
            site |
              2  |   .1858761   .1197359     1.55   0.121    -.0488019    .4205541
              3  |  -.4475149   .1290276    -3.47   0.001    -.7004044   -.1946254
                 |
           _cons |   .1372069   .1876839     0.73   0.465    -.2306467    .5050605
    -------------+----------------------------------------------------------------
    Uninsure     |
             age |   .0006181   .0066241     0.09   0.926     -.012365    .0136011
            male |   .2341683   .2142533     1.09   0.274    -.1857605    .6540972
        nonwhite |   .3329798   .2448515     1.36   0.174    -.1469203      .81288
                 |
            site |
              2  |  -1.126122   .2727336    -4.13   0.000     -1.66067   -.5915738
              3  |  -.2055748    .214918    -0.96   0.339    -.6268063    .2156568
                 |
           _cons |  -1.740114   .3501604    -4.97   0.000    -2.426416   -1.053813
    ------------------------------------------------------------------------------

    Comment


    • #3
      That's a very good idea - thank you very much Andrew!

      Comment

      Working...
      X