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
Comment