Announcement

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

  • Two-part model, binary logit followed by fractional logit

    Hello, I was interested in using a two-part fractional logistic regression model, my dependent variable, -Prop_oopdental_costs- measures the proportion of dental expenditures of household income, the variable has a high number of 0s. I was wondering if this syntax would implement a two part fractional logistic regression, specifically a binary logit and a fractional logit. The syntax of what I think would be a two part model using the twopm command is shown below along with a dataex of the variables used for my regression.


    Code:
    
    ***two step fractional regression models**** 
    svy: twopm oopdental_costs inc_d i.endentulism i.race i.age_cat i.male i.education i.veteran i.mothered i.dentalinsurance_w1 i.QuantHI_wave1 i.Quant_wealth_wave1 /// 
    i.smoke_now c.chronicdisease i.r11dentst, firstpart(logit) secondpart(glm, family(binomial) link(log))




    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(Prop_oopdental_costs inc_d endentulism race age_cat) byte(male education veteran) float mothered byte(QuantHI_wave1 Quant_wealth_wave1) float(smoke_now chronicdisease_wave1 dentalinsurance_wave1)
    .0004264392 0 0 1 3 0 5 0 1 3 4 0 2 0
              0 0 0 1 1 0 5 0 1 1 3 0 2 1
      .04166667 0 0 1 2 0 3 0 0 4 4 0 0 1
      .13131976 0 0 1 2 0 4 0 1 1 4 1 0 0
     .009246417 0 0 1 3 1 5 1 1 4 4 0 2 1
      .06934813 0 0 1 2 0 5 0 0 4 4 0 0 1
    .0026012764 0 0 4 3 0 5 0 1 4 4 0 2 1
              0 0 0 3 3 0 1 0 . 1 1 0 2 1
       .3121998 0 0 3 3 0 1 0 0 1 1 0 2 1
              0 0 0 1 2 0 1 0 1 1 4 0 1 1
     .011406844 0 0 1 4 1 5 1 0 3 4 0 1 0
              0 0 0 3 3 0 1 0 0 1 1 0 2 1
              0 0 1 4 3 1 1 0 0 1 1 0 3 1
              0 0 1 2 3 0 3 0 0 1 1 0 1 1
              0 0 0 2 3 1 1 0 . 1 1 0 0 0
      .02031223 0 0 1 3 0 4 0 1 4 1 0 1 1
              0 1 1 2 3 0 1 0 . 2 1 0 1 1
              0 0 0 1 3 0 4 0 1 3 4 0 0 1
     .005668934 0 0 1 3 1 5 1 1 4 4 0 0 1
       .2329048 0 0 1 3 0 1 0 1 2 4 0 1 0
              0 0 0 1 3 0 3 0 1 1 3 0 2 0
    .0020826391 0 1 4 3 0 5 0 0 4 3 0 2 1
     .005553704 0 0 4 3 1 5 1 0 4 3 0 2 1
     .006561351 0 0 1 3 0 3 0 0 3 4 0 0 1
              0 0 1 1 3 1 4 1 . 3 3 0 1 1
     .012622437 0 0 1 2 0 5 0 1 3 3 0 0 1
      .00494963 0 0 1 4 0 5 0 1 4 4 0 1 0
     .021990104 0 0 1 3 1 5 1 1 1 4 0 1 0
       .1649258 0 0 1 3 0 3 0 1 1 4 0 0 0
     .030142045 0 0 1 3 1 5 0 0 4 3 0 3 1
    .0028258166 0 0 1 3 0 5 0 1 4 3 0 0 1
              0 0 0 2 3 0 1 0 0 2 3 0 2 1
              0 0 0 2 3 0 5 0 1 2 1 0 2 0
              0 0 1 2 3 0 1 0 0 1 3 0 1 0
              0 0 1 2 2 0 3 0 0 3 1 0 0 0
              0 0 0 2 3 1 3 1 1 2 3 0 2 1
              0 0 0 2 3 0 3 0 1 2 3 0 0 1
              0 0 0 2 3 1 3 0 0 1 1 . 2 0
    .0044385265 0 0 3 1 0 3 0 1 2 4 0 0 1
              0 0 0 4 3 0 1 0 0 3 3 0 0 1
     .003188572 0 0 4 4 1 5 0 0 3 3 0 0 1
     .028402055 0 0 3 3 1 4 1 1 1 3 0 0 1
              0 0 0 1 2 0 4 0 1 1 3 0 0 1
              0 0 0 1 2 0 4 0 0 4 4 0 1 0
       .8988764 0 0 2 3 0 5 0 0 1 1 0 3 1
              0 0 1 4 3 0 4 0 0 2 1 0 0 1
     .005789047 1 0 1 3 1 1 0 1 2 4 0 1 1
     .008683571 0 0 1 3 0 5 0 1 2 4 0 1 1
     .001757428 0 0 1 3 1 3 1 0 3 4 0 2 1
              0 0 0 2 3 0 4 0 0 2 3 0 2 0
     .007549233 0 0 1 4 1 5 1 1 4 4 0 2 1
      .08579273 0 0 3 3 0 3 0 0 2 2 0 1 0
              0 0 1 3 3 1 2 1 0 2 2 0 1 0
      16.666666 0 0 4 4 1 5 0 0 2 2 0 1 0
              0 0 0 4 3 0 5 0 0 2 2 0 2 0
              0 0 0 2 3 0 1 0 0 1 1 1 2 0
    .0014092446 0 0 2 3 0 3 0 0 1 1 0 1 0
              0 0 0 2 3 0 1 0 . 1 1 0 2 0
      .02388725 0 0 1 3 1 4 1 0 3 1 0 3 0
     .019906044 1 0 4 2 0 1 0 1 3 1 0 5 1
     .007708119 0 0 1 4 1 3 1 1 3 4 0 3 0
     .004946043 0 0 1 3 0 1 0 1 3 4 0 1 0
      .02088542 0 0 1 3 0 5 0 1 3 4 0 1 1
              0 0 0 1 3 0 3 0 1 2 2 0 2 0
     .007807133 0 0 1 4 0 4 0 0 3 4 0 2 0
     .007807133 0 0 1 4 1 5 1 . 3 4 0 1 1
      .03898002 0 0 1 4 1 4 1 1 2 3 0 1 0
      .01949001 0 0 1 3 0 3 0 0 2 3 0 3 0
              0 0 0 1 2 0 3 0 1 2 2 0 1 1
              0 0 0 1 3 0 2 0 0 1 4 0 0 1
    .0011483693 0 0 3 3 0 3 0 . 1 1 0 3 0
              0 1 0 2 1 0 1 0 0 2 1 1 1 0
              0 0 0 2 1 0 4 0 0 1 1 1 1 1
              0 0 1 2 3 0 4 0 1 1 2 0 2 0
              0 0 0 1 3 0 1 0 0 1 1 0 2 0
     .014272122 0 0 1 3 1 4 1 1 3 3 0 1 1
     .007608323 0 0 1 3 1 3 0 . 2 3 0 1 0
              0 0 0 1 3 0 3 0 1 1 4 0 1 0
              0 0 0 1 4 1 1 1 0 3 3 0 0 1
     .015284408 0 0 1 3 1 5 1 1 4 4 0 2 0
     .004883766 0 0 1 3 1 5 0 0 2 4 0 1 1
    .0019535066 0 0 1 1 0 5 0 1 2 4 0 0 1
              0 0 1 1 3 1 2 0 0 2 2 0 3 0
     .032701112 0 0 3 2 0 1 0 0 2 2 . 2 0
              0 0 0 1 4 1 1 0 0 2 3 0 2 1
     .009093665 0 0 1 4 0 4 0 0 1 3 0 0 0
              0 0 1 2 3 0 3 0 0 1 1 0 3 0
              0 0 0 2 3 1 2 0 1 1 1 1 0 0
              0 1 1 2 3 1 3 0 1 1 2 1 0 0
              0 0 0 2 3 0 4 0 0 1 1 0 2 0
    .0007998232 0 0 2 3 1 4 1 0 4 2 0 2 1
              0 1 0 2 1 0 4 0 0 4 2 1 2 1
     .015086207 0 0 2 3 1 1 0 1 2 2 0 3 0
              0 0 0 2 2 1 3 1 0 2 2 . 3 0
              0 0 1 1 3 1 1 1 0 3 4 0 3 0
      .04651163 0 0 1 3 0 1 0 0 3 4 0 0 0
              0 0 1 2 3 1 1 1 . 1 2 0 3 0
              0 0 0 2 2 0 3 0 1 2 3 0 1 0
              0 0 1 1 2 0 3 0 . 2 1 1 0 0
              0 1 1 1 3 1 4 0 1 3 3 0 3 0
    end
    label values inc_d inc_d
    label def inc_d 0 "No", modify
    label def inc_d 1 "Yes", modify
    label values endentulism endentulism
    label def endentulism 0 "No", modify
    label def endentulism 1 "Yes", modify
    label values race race
    label def race 1 "White", modify
    label def race 2 "Black", modify
    label def race 3 "Hispanic", modify
    label def race 4 "Other", modify
    label values age_cat age_cat
    label def age_cat 1 "50-59", modify
    label def age_cat 2 "60-69", modify
    label def age_cat 3 "70-79", modify
    label def age_cat 4 "80+", modify
    label values male male
    label def male 0 "Female", modify
    label def male 1 "Male", modify
    label values education EDUC
    label def EDUC 1 "1.lt high-school", modify
    label def EDUC 2 "2.ged", modify
    label def EDUC 3 "3.high-school graduate", modify
    label def EDUC 4 "4.some college", modify
    label def EDUC 5 "5.college and above", modify
    label values veteran veteran
    label def veteran 0 "No", modify
    label def veteran 1 "Yes", modify
    label values mothered mothered
    label def mothered 0 "Less than High School", modify
    label def mothered 1 "High School or Higher", modify
    label values smoke_now smoke_now
    label def smoke_now 0 "Non-Smoker", modify
    label def smoke_now 1 "Currently Smokes", modify
    label values dentalinsurance_wave1 dentalinsurance
    label def dentalinsurance 0 "No", modify
    label def dentalinsurance 1 "Yes", modify

  • #2
    Isn’t this the same question you asked here? Did cpm not solve the problem?

    https://www.statalist.org/forums/for...gression-model

    When you post a question, it is good to indicate what worked or didn’t work so anyone who has a similar question will know what the answer was (or wasn’t).
    Last edited by Richard Williams; 24 Apr 2025, 17:35.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Richard Williams I wanted to try the -twopm- command

      Comment


      • #4
        Your commands won't run as is because you have not told how to svyset the data (are the necessary variables included?) and because at least one variable, oopdental_costs, is not included in the extract. Including data with dataex is good but first make sure you can replicate your problem with the extract provided.

        I'm curious why you ask though. Did you try running the command you provided? Did you get errors? Did the results seem plausible? Without seeing output and without being able to replicate the analysis, it is hard to know if your syntax is right.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Richard Williams My apologies, I did not show all of the code and output earlier. Attached is the correct model and the output. I was also wondering if it would be possible for you to help me interpret the -margins- command for a fractional logistic regression. Specifically, I would like to understand the proper way to interpret -margins- results for a fractional dependent variable (FDV) estimated using a two-equation fractional logistic regression model.

          In the output shown below, my dependent variable is the proportion of dental expenditures relative to household income. I took the margins for the variable -race-, where 0 is female and 1 is male. Given that, would the correct interpretation of the -inc_d- variable, which is an indicator of incarceration, be: "Incarcerated males have a 0.0028 percentage point decrease in the proportion of dental expenditures relative to household income compared to non-incarcerated males"?

          thank you

          Code:
          svyset raehsamp [pweight=new_weight], strata (raestrat) singleunit(centered)
          
          
          svy: twopm Prop_oopdental_costs i.inc_d i.endentulism i.race i.age_cat i.male i.education i.veteran i.mothered i.dentalinsurance_wave1 i.QuantHI_wave1 i.Quant_wealth_wave1 /// 
          i.smoke_now c.chronicdisease_wave1 i.dentistvisit_wave1, firstpart(logit) secondpart(glm, family(binomial) link(log))
          Code:
          
          . svyset raehsamp [pweight=new_weight], strata (raestrat) singleunit(centered)
          
          Sampling weights: new_weight
                       VCE: linearized
               Single unit: centered
                  Strata 1: raestrat
           Sampling unit 1: raehsamp
                     FPC 1: <zero>
          
          . 
          . 
          . svy: twopm Prop_oopdental_costs i.inc_d i.endentulism i.race i.age_cat i.male 
          > i.education i.veteran i.mothered i.dentalinsurance_wave1 i.QuantHI_wave1 i.Qua
          > nt_wealth_wave1 /// 
          > i.smoke_now c.chronicdisease_wave1 i.dentistvisit_wave1, firstpart(logit) seco
          > ndpart(glm, family(binomial) link(log)) 
          (running twopm on estimation sample)
          
          Survey data analysis
          
          Number of strata =  56                            Number of obs   =     12,388
          Number of PSUs   = 112                            Population size = 74,493,528
                                                            Design df       =         56
                                                            F(25, 32)       =     100.52
                                                            Prob > F        =     0.0000
          
          -------------------------------------------------------------------------------
                        |             Linearized
          Prop_oopden~s | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
          --------------+----------------------------------------------------------------
          logit         |
                  inc_d |
                   Yes  |   .1505429   .1260034     1.19   0.237    -.1018722     .402958
                        |
            endentulism |
                   Yes  |  -1.058458    .096437   -10.98   0.000    -1.251644   -.8652715
                        |
                   race |
                 Black  |  -.5168069   .0995424    -5.19   0.000    -.7162142   -.3173995
              Hispanic  |  -.1762137   .1383921    -1.27   0.208    -.4534465     .101019
                 Other  |  -.3382994   .1494286    -2.26   0.027    -.6376409    -.038958
                        |
                age_cat |
                 60-69  |   .0050947   .0768683     0.07   0.947    -.1488911    .1590804
                 70-79  |   .3232289   .0874727     3.70   0.001     .1480001    .4984577
                   80+  |   .3212384   .0947502     3.39   0.001      .131431    .5110459
                        |
                   male |
                  Male  |  -.1843881   .0733436    -2.51   0.015     -.331313   -.0374632
                        |
              education |
                 2.ged  |   .3333046   .1687933     1.97   0.053     -.004829    .6714382
          3.high-sch..  |   .2531985   .1270179     1.99   0.051     -.001249     .507646
          4.some col..  |   .3777225   .1435407     2.63   0.011      .090176     .665269
          5.college ..  |   .4816554   .1408498     3.42   0.001     .1994993    .7638116
                        |
                veteran |
                   Yes  |  -.1792122   .0736646    -2.43   0.018    -.3267801   -.0316443
                        |
               mothered |
          High Schoo..  |   .0930857   .0610289     1.53   0.133    -.0291699    .2153413
                        |
          dentalinsur~1 |
                   Yes  |  -.5248472   .0738248    -7.11   0.000    -.6727359   -.3769584
                        |
          QuantHI_wave1 |
                     2  |    .354398   .1034084     3.43   0.001     .1472461    .5615499
                     3  |   .4737694    .097816     4.84   0.000     .2778203    .6697184
                     4  |   .4831018   .1063503     4.54   0.000     .2700565    .6961471
                        |
          Quant_wealt~1 |
                     2  |   .2677122   .0859271     3.12   0.003     .0955794    .4398449
                     3  |   .4972283     .09002     5.52   0.000     .3168965      .67756
                     4  |   .5974829   .1130351     5.29   0.000     .3710464    .8239194
                        |
              smoke_now |
          Currently ..  |   .1141293   .1020275     1.12   0.268    -.0902563     .318515
          chronicdise~1 |   .0721972   .0266848     2.71   0.009     .0187411    .1256533
                        |
          dentistvisi~1 |
                 1.yes  |    3.10465   .0708799    43.80   0.000      2.96266    3.246639
                  _cons |  -2.698121   .1522319   -17.72   0.000    -3.003078   -2.393164
          --------------+----------------------------------------------------------------
          glm           |
                  inc_d |
                   Yes  |  -.2499156   .1631482    -1.53   0.131    -.5767407    .0769096
                        |
            endentulism |
                   Yes  |   .4491869   .1326433     3.39   0.001     .1834704    .7149034
                        |
                   race |
                 Black  |  -.0078123   .1275793    -0.06   0.951    -.2633844    .2477598
              Hispanic  |   .3853324   .1192054     3.23   0.002     .1465354    .6241294
                 Other  |   .3754964   .1816016     2.07   0.043     .0117046    .7392881
                        |
                age_cat |
                 60-69  |   .0023455   .1072984     0.02   0.983    -.2125991      .21729
                 70-79  |  -.0245539   .1016785    -0.24   0.810    -.2282404    .1791326
                   80+  |    .065729   .1238719     0.53   0.598    -.1824161    .3138741
                        |
                   male |
                  Male  |  -.1054136   .0907395    -1.16   0.250    -.2871867    .0763596
                        |
              education |
                 2.ged  |   .1674789   .1993731     0.84   0.404    -.2319135    .5668713
          3.high-sch..  |  -.0692488   .1549134    -0.45   0.657    -.3795776      .24108
          4.some col..  |  -.0033853   .1479015    -0.02   0.982    -.2996677    .2928971
          5.college ..  |   .0530727   .1570828     0.34   0.737    -.2616019    .3677472
                        |
                veteran |
                   Yes  |   .0841625   .1072957     0.78   0.436    -.1307767    .2991016
                        |
               mothered |
          High Schoo..  |   .1077362   .0549374     1.96   0.055    -.0023167     .217789
                        |
          dentalinsur~1 |
                   Yes  |  -.4305734   .0714112    -6.03   0.000    -.5736272   -.2875197
                        |
          QuantHI_wave1 |
                     2  |  -.5582195   .1015559    -5.50   0.000    -.7616604   -.3547786
                     3  |  -1.139161   .0959001   -11.88   0.000    -1.331272   -.9470497
                     4  |  -1.695963   .1066625   -15.90   0.000    -1.909633   -1.482292
                        |
          Quant_wealt~1 |
                     2  |   .0704406   .1170107     0.60   0.550      -.16396    .3048411
                     3  |  -.0019973   .1127199    -0.02   0.986    -.2278023    .2238078
                     4  |   .0597961   .1006386     0.59   0.555    -.1418072    .2613993
                        |
              smoke_now |
          Currently ..  |   .2799902   .1093534     2.56   0.013     .0609292    .4990513
          chronicdise~1 |   .0285302   .0372701     0.77   0.447    -.0461308    .1031912
                        |
          dentistvisi~1 |
                 1.yes  |   .1888636   .1443224     1.31   0.196     -.100249    .4779762
                  _cons |   -2.98134   .3296123    -9.04   0.000    -3.641632   -2.321047
          -------------------------------------------------------------------------------
          
          . 
          end of do-file



          Code:
          margins, dydx(*) at(male=(0,1)) post 
          
          . margins, dydx(*) at(male=(0,1)) post 
          
          Average marginal effects
          
          Number of strata =  56                            Number of obs   =     12,289
          Number of PSUs   = 112                            Population size = 74,493,528
                                                            Subpop. no. obs =     11,495
                                                            Subpop. size    =          .
          Model VCE: Linearized                             Design df       =         56
          
          Expression: twopm combined expected values, predict()
          dy/dx wrt:  1.inc_d 1.endentulism 2.race 3.race 4.race 2.age_cat 3.age_cat
                      4.age_cat 1.male 2.education 3.education 4.education 5.education
                      1.veteran 1.mothered 1.dentalinsurance_wave1 2.QuantHI_wave1
                      3.QuantHI_wave1 4.QuantHI_wave1 2.Quant_wealth_wave1
                      3.Quant_wealth_wave1 4.Quant_wealth_wave1 1.smoke_now
                      chronicdisease_wave1 1.dentistvisit_wave1
          1._at: male = 0
          2._at: male = 1
          
          -------------------------------------------------------------------------------
                        |            Delta-method
                        |      dy/dx   std. err.      t    P>|t|     [95% conf. interval]
          --------------+----------------------------------------------------------------
          0.inc_d       |  (base outcome)
          --------------+----------------------------------------------------------------
          1.inc_d       |
                    _at |
                     1  |  -.0028524   .0020337    -1.40   0.166    -.0069264    .0012215
                     2  |  -.0023984    .001795    -1.34   0.187    -.0059942    .0011974
          --------------+----------------------------------------------------------------
          0.endentulism |  (base outcome)
          --------------+----------------------------------------------------------------
          1.endentulism |
                    _at |
                     1  |   .0013451   .0022881     0.59   0.559    -.0032384    .0059286
                     2  |   .0007168   .0019473     0.37   0.714    -.0031841    .0046177
          --------------+----------------------------------------------------------------
          1.race        |  (base outcome)
          --------------+----------------------------------------------------------------
          2.race        |
                    _at |
                     1  |  -.0022137   .0017655    -1.25   0.215    -.0057504     .001323
                     2  |   -.002033   .0014691    -1.38   0.172     -.004976    .0009099
          --------------+----------------------------------------------------------------
          3.race        |
                    _at |
                     1  |   .0058511   .0025868     2.26   0.028     .0006691     .011033
                     2  |   .0049287   .0022447     2.20   0.032      .000432    .0094255
          --------------+----------------------------------------------------------------
          4.race        |
                    _at |
                     1  |   .0046841   .0034347     1.36   0.178    -.0021966    .0115647
                     2  |   .0038666   .0028808     1.34   0.185    -.0019044    .0096375
          --------------+----------------------------------------------------------------
          1.age_cat     |  (base outcome)
          --------------+----------------------------------------------------------------
          2.age_cat     |
                    _at |
                     1  |   .0000553   .0015475     0.04   0.972    -.0030447    .0031554
                     2  |   .0000486     .00132     0.04   0.971    -.0025957     .002693
          --------------+----------------------------------------------------------------
          3.age_cat     |
                    _at |
                     1  |   .0009533   .0015436     0.62   0.539    -.0021388    .0040455
                     2  |   .0009046    .001347     0.67   0.505    -.0017937    .0036028
          --------------+----------------------------------------------------------------
          4.age_cat     |
                    _at |
                     1  |   .0023949   .0019341     1.24   0.221    -.0014796    .0062694
                     2  |   .0021391   .0017311     1.24   0.222    -.0013286    .0056069
          --------------+----------------------------------------------------------------
          0.male        |  (base outcome)
          --------------+----------------------------------------------------------------
          1.male        |
                    _at |
                     1  |  -.0021964   .0012515    -1.76   0.085    -.0047035    .0003107
                     2  |  -.0021964   .0012515    -1.76   0.085    -.0047035    .0003107
          --------------+----------------------------------------------------------------
          1.education   |  (base outcome)
          --------------+----------------------------------------------------------------
          2.education   |
                    _at |
                     1  |   .0041974   .0030879     1.36   0.179    -.0019884    .0103833
                     2  |   .0036758   .0027395     1.34   0.185    -.0018121    .0091637
          --------------+----------------------------------------------------------------
          3.education   |
                    _at |
                     1  |   .0001192   .0021425     0.06   0.956    -.0041728    .0044112
                     2  |   .0001769   .0018182     0.10   0.923    -.0034654    .0038191
          --------------+----------------------------------------------------------------
          4.education   |
                    _at |
                     1  |   .0015845   .0022132     0.72   0.477    -.0028491    .0060182
                     2  |    .001461   .0019158     0.76   0.449    -.0023767    .0052987
          --------------+----------------------------------------------------------------
          5.education   |
                    _at |
                     1  |   .0029289   .0025243     1.16   0.251    -.0021279    .0079857
                     2  |   .0026396   .0021981     1.20   0.235    -.0017637     .007043
          --------------+----------------------------------------------------------------
          0.veteran     |  (base outcome)
          --------------+----------------------------------------------------------------
          1.veteran     |
                    _at |
                     1  |   .0004952    .001655     0.30   0.766    -.0028202    .0038106
                     2  |    .000368    .001387     0.27   0.792    -.0024105    .0031466
          --------------+----------------------------------------------------------------
          0.mothered    |  (base outcome)
          --------------+----------------------------------------------------------------
          1.mothered    |
                    _at |
                     1  |   .0019968    .000826     2.42   0.019     .0003421    .0036514
                     2  |   .0017293   .0007342     2.36   0.022     .0002586    .0031999
          --------------+----------------------------------------------------------------
          0.dentalins~1 |  (base outcome)
          --------------+----------------------------------------------------------------
          1.dentalins~1 |
                    _at |
                     1  |  -.0081498   .0011678    -6.98   0.000    -.0104892   -.0058103
                     2  |  -.0071101   .0010865    -6.54   0.000    -.0092867   -.0049336
          --------------+----------------------------------------------------------------
          1.QuantHI_w~1 |  (base outcome)
          --------------+----------------------------------------------------------------
          2.QuantHI_w~1 |
                    _at |
                     1  |  -.0121293   .0030274    -4.01   0.000    -.0181938   -.0060648
                     2  |  -.0101449   .0027405    -3.70   0.000    -.0156348   -.0046551
          --------------+----------------------------------------------------------------
          3.QuantHI_w~1 |
                    _at |
                     1  |  -.0208897   .0028406    -7.35   0.000    -.0265801   -.0151992
                     2  |  -.0176327   .0024904    -7.08   0.000    -.0226215   -.0126439
          --------------+----------------------------------------------------------------
          4.QuantHI_w~1 |
                    _at |
                     1  |  -.0259499   .0030548    -8.49   0.000    -.0320694   -.0198303
                     2  |  -.0219843   .0025899    -8.49   0.000    -.0271726   -.0167961
          --------------+----------------------------------------------------------------
          1.Quant_wea~1 |  (base outcome)
          --------------+----------------------------------------------------------------
          2.Quant_wea~1 |
                    _at |
                     1  |   .0022032   .0017497     1.26   0.213    -.0013019    .0057082
                     2  |   .0019537   .0014655     1.33   0.188     -.000982    .0048895
          --------------+----------------------------------------------------------------
          3.Quant_wea~1 |
                    _at |
                     1  |   .0020875   .0016051     1.30   0.199    -.0011279    .0053028
                     2  |   .0019245   .0013632     1.41   0.164    -.0008062    .0046553
          --------------+----------------------------------------------------------------
          4.Quant_wea~1 |
                    _at |
                     1  |   .0034958   .0014731     2.37   0.021     .0005447    .0064469
                     2  |   .0031576   .0012167     2.60   0.012     .0007202     .005595
          --------------+----------------------------------------------------------------
          0.smoke_now   |  (base outcome)
          --------------+----------------------------------------------------------------
          1.smoke_now   |
                    _at |
                     1  |   .0052485   .0022648     2.32   0.024     .0007115    .0097855
                     2  |   .0045207   .0020467     2.21   0.031     .0004207    .0086207
          --------------+----------------------------------------------------------------
          chronicdise~1 |
                    _at |
                     1  |   .0007278    .000585     1.24   0.219     -.000444    .0018996
                     2  |   .0006415   .0005112     1.25   0.215    -.0003826    .0016657
          --------------+----------------------------------------------------------------
          0.dentistvi~1 |  (base outcome)
          --------------+----------------------------------------------------------------
          1.dentistvi~1 |
                    _at |
                     1  |   .0203705    .001348    15.11   0.000     .0176701    .0230709
                     2  |   .0176885   .0013683    12.93   0.000     .0149474    .0204297
          -------------------------------------------------------------------------------
          Note: dy/dx for factor levels is the discrete change from the base level.
          
          . 
          end of do-file

          Comment


          • #6
            Since I’ve never used twopm I can’t give you a quick answer. Here is the SJ article on the command if you haven’t read it.

            https://journals.sagepub.com/doi/pdf...867X1501500102
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment

            Working...
            X