Hello
I am trying to graph predicted probabilities for child undernutrition. I am using multinomial logistic regression. The response variable has five categories (not undernourished, stunted only, underweight and stunted, wasted and Missing). I am interested in plotting two categories (stunted only and underweight and stunted. I would like to average values for the standardised age for the graphing. My model is as follows: svy:mlogit undernutrition Stagesquared Stage Childsex i.sbi3 i.pbi5 i.Wealthstatus i.sizeatbirth ///
Motherheight Motherweight i.Maternaleducation i.Ethnicity Agesbi
On google I have come across some information which led me to do the following:
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(1)) vsquish
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(2)) vsquish
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(3)) vsquish
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(4)) vsquish
predict p1 p2 p3 p4 p5
sort Stage
twoway (line p1 Stage if sbi3 ==1) (line p1 Stage if sbi3==2),legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p2 Stage if sbi3==1) (line p2 Stage if sbi3==2), legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p3 Stage if sbi3 ==1) (line p3 Stage if sbi3==2),legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p4 Stage if sbi3==1) (line p4 Stage if sbi3==2), legend(order(1"sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p5 Stage if sbi3 ==1) (line p5 Stage if sbi3==2),legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
Its not working for me. I am sure I am missing something here. Could anyone in the know please help.
Thank you
Lana
I am trying to graph predicted probabilities for child undernutrition. I am using multinomial logistic regression. The response variable has five categories (not undernourished, stunted only, underweight and stunted, wasted and Missing). I am interested in plotting two categories (stunted only and underweight and stunted. I would like to average values for the standardised age for the graphing. My model is as follows: svy:mlogit undernutrition Stagesquared Stage Childsex i.sbi3 i.pbi5 i.Wealthstatus i.sizeatbirth ///
Motherheight Motherweight i.Maternaleducation i.Ethnicity Agesbi
On google I have come across some information which led me to do the following:
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(1)) vsquish
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(2)) vsquish
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(3)) vsquish
margins, at(Stage = (-1.40 (0.35) 1.75)) predict (outcome(4)) vsquish
predict p1 p2 p3 p4 p5
sort Stage
twoway (line p1 Stage if sbi3 ==1) (line p1 Stage if sbi3==2),legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p2 Stage if sbi3==1) (line p2 Stage if sbi3==2), legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p3 Stage if sbi3 ==1) (line p3 Stage if sbi3==2),legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p4 Stage if sbi3==1) (line p4 Stage if sbi3==2), legend(order(1"sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
twoway (line p5 Stage if sbi3 ==1) (line p5 Stage if sbi3==2),legend(order(1 "sbi3 = 1" 2 "sbi3 = 2") ring(0) position(7) row(1))
Its not working for me. I am sure I am missing something here. Could anyone in the know please help.
Thank you
Lana
Comment