I am modeling cost with treatment, facility, and month using a GLM with a gamma distribution, and there is significant 3-way interaction. Here are the variable definitions
Cost: continuous ($30,000-$200,000)
Treatment: binary (0 or 1)
Facility: categorical (1, 2, 3)
Month: continuous (0-110)
I have a lot of details I need to parse out, one of which is testing for differences in cost at different month values. For example, below is an interaction plot for facility 1. Clearly, there is no significant difference between treatment 0 or treatment 1; however, I want to test for a significant change in cost between months 10 and 90. How would I test for a mean cost change from 10 months to 90 months at only facility 1?
Cost: continuous ($30,000-$200,000)
Treatment: binary (0 or 1)
Facility: categorical (1, 2, 3)
Month: continuous (0-110)
I have a lot of details I need to parse out, one of which is testing for differences in cost at different month values. For example, below is an interaction plot for facility 1. Clearly, there is no significant difference between treatment 0 or treatment 1; however, I want to test for a significant change in cost between months 10 and 90. How would I test for a mean cost change from 10 months to 90 months at only facility 1?
Code:
glm cost i.treatment##i.facility##c.month, f(gam) l(log)margins, at(month=(10(10)90) treatment=(1 2) facility=(1)) marginsplot, noci title("Interaction Plot of Treatment Strategy Over Time") subtitle("Facility 1 Patients Only") xtitle("Number of Months",margin(medium)) ytitle("Estimated Cost ($)", margin(medium)) graphregion(col(white)) ylabel(40000(20000)125000, format(%9.0gc) labsize(small) ) xlabel(10(20)90,labsize(small)) legend(on order(1 "0" 2 "1"))

Comment