I would like to overlay predicted probabilities from two separate logistic regressions. My outcome of interest is iatrogenic fistula, which is increasing over time (1990-2017). People may wonder whether it is increasing at the same pace as delivery by Cesarean section (CS). I would therefore like to provide plots for each of five countries that show the increase in CS over time and the increase in iatrogenic fistula over time. Both "anyCS" (CS delivery) and "iatrogenic" (iatrogenic fistula) are dichotomous outcomes.
I am able to separately create useful plots with the following code:
Code:
use "C:\Users\cngongo\Desktop\CS-analysis-women.dta", clear
logit anyCS ibn.place ibn.place#c.yeardevelop, noconstant nolog
quietly margins place, at(yeardevelop=(1990(3)2017)) saving(CStime, replace)
use CStime, clear
xtset _m1 _at2
decode _m1, gen(nation)
xtline _margin
use "C:\Users\cngongo\Desktop\CS-analysis-women.dta", clear
logit iatrogenic ibn.place ibn.place#c.yeardevelop, noconstant nolog
quietly margins place, at(yeardevelop=(1990(3)2017)) saving(iattime, replace)
use iattime, clear
xtset _m1 _at2
decode _m1, gen(nation)
xtline _margin
Would you please advise on how I can overlay the output from these two different logistic regressions? I am open to keeping data from one country at a time if that would be simplest. My goal is to have a graph for each of the five countries that has the rise in CS and the rise in iatrogenic fistula, allowing viewers to easily compare the slopes. I will be most grateful for your help.
Best wishes,
Carrie
0 Response to Overlay predicted probabilities from separate logistic regressions
Post a Comment