Dear all,
I am investigating the effects of a continuous#categorical interaction on the binary outcome "aki2". What I am looking to show is how the probability of aki2 changes across different values in the continuous variable (c.log_avl), as a function of the interaction term (i.it_type). Running margins and marginsplot defines this relationship nicely.
logistic aki2 c.log_avl#i.it_type i.agecat male race i.bmicat i.cci_cat Auto_CKD_Preop i.renal i.clavien_cat
quietly margins it_type, at(log_avl=(-2(0.1)6))
marginsplot

So far so good.
Visually, when I inspect the curves 2.it_type and 1.it_type, the confidence intervals separate at the x-axis (log_avl) value of ~1.7. However, my goal is attach statistical proof to that visual observation. When I use the contrast term with margins, I don't get the results I expect. The graph of the difference in curves follow the expected shape; however, the confidence intervals are almost non-existent, and the curves develop statistically significant separation from one another at very small values of x. Why is that? I would expect the red curve below begin to have confidence intervals different from zero at roughly an x-axis value of 1.7. However, that's not what's shown. This happens irrespective of how I specify the contrast option, and irrespective of any correction for multiple comparisons. Any ideas? Many thanks for any help
margins rb1.it_type, at(log_avl=(-2(0.1)6)) mcompare(bonferroni)
marginsplot, yline(0)

Best,
Julien
I am investigating the effects of a continuous#categorical interaction on the binary outcome "aki2". What I am looking to show is how the probability of aki2 changes across different values in the continuous variable (c.log_avl), as a function of the interaction term (i.it_type). Running margins and marginsplot defines this relationship nicely.
logistic aki2 c.log_avl#i.it_type i.agecat male race i.bmicat i.cci_cat Auto_CKD_Preop i.renal i.clavien_cat
quietly margins it_type, at(log_avl=(-2(0.1)6))
marginsplot
So far so good.
Visually, when I inspect the curves 2.it_type and 1.it_type, the confidence intervals separate at the x-axis (log_avl) value of ~1.7. However, my goal is attach statistical proof to that visual observation. When I use the contrast term with margins, I don't get the results I expect. The graph of the difference in curves follow the expected shape; however, the confidence intervals are almost non-existent, and the curves develop statistically significant separation from one another at very small values of x. Why is that? I would expect the red curve below begin to have confidence intervals different from zero at roughly an x-axis value of 1.7. However, that's not what's shown. This happens irrespective of how I specify the contrast option, and irrespective of any correction for multiple comparisons. Any ideas? Many thanks for any help
margins rb1.it_type, at(log_avl=(-2(0.1)6)) mcompare(bonferroni)
marginsplot, yline(0)
Best,
Julien
Comment