Dear Statalist,
I have two datasets, A and B, that correspond to the bootstrapped predictive margins from the interaction term, it_type3##c.Ischemia_Time_Min, in a logistic regression model (where A corresponds to it_type3==0, and B corresponds to it_type3==1). I'm able to compute the intersection of these two lines, (x*,y*). However, I'd like to compute a confidence interval around x*. How can I do this? Here is the code that gets me to the intersection of the two lines. What I'd like to get is the range corresponding to the dotted band in the attached figure.

I have two datasets, A and B, that correspond to the bootstrapped predictive margins from the interaction term, it_type3##c.Ischemia_Time_Min, in a logistic regression model (where A corresponds to it_type3==0, and B corresponds to it_type3==1). I'm able to compute the intersection of these two lines, (x*,y*). However, I'd like to compute a confidence interval around x*. How can I do this? Here is the code that gets me to the intersection of the two lines. What I'd like to get is the range corresponding to the dotted band in the attached figure.
Code:
capture program drop savemargins
program savemargins, rclass
logistic aki2 c.Preop_GFR c.log_avl i.it_type3##c.Ischemia_Time_Min i.agecat male i.race i.bmicat i.cci_cat i.renal c.Tm1Sz1 i.clavien_cat
margins it_type3, at(Ischemia_Time_Min = (10(1)55)) post
end
bootstrap _b, saving(margins, replace) reps(100): savemargins
marginsplot, ///
xtitle("Ischemia Time (min)") ytitle("Predicted Probability of AKI") title ("") ///
plotopts(ylabel(0.1 (0.1) 1) xlabel(10(5)55) lwidth(thick)) ///
legend(order(1 "Cold Ischemia" ///
2 "Warm ischemia"))
/* Where do curves overlap */
logistic aki2 c.Preop_GFR c.log_avl i.it_type3##c.Ischemia_Time_Min i.agecat male i.race i.bmicat i.cci_cat i.renal c.Tm1Sz1 i.clavien_cat
disp -_b[1.it_type3]/_b[1.it_type3#c.Ischemia_Time_Min]

Comment