Im working with a surgical dataset and trying to predict whether a particular technique (doing the operation under local anesthesia rather than general anesthesia) is faster in terms of the total operative time. As expected, the dependent variable (time) is quite skewed and this is fixed nicely when I use the natural ln transformation of the total time. I run a linear regression as follows:
variables
lntor = ln of the operative time
i.local = whether the surgery was done under local or general anesthesia
age = patient age
i.comorbid = a comorbidity score
reg lntor i.local age i.comorbid
the beta coefficient for i.local is -0.12 which I interpret as a semi-elasticity indicating that doing the surgery under local anesthesia reduces total operative time by 12%
I'd like to then know what the actual change in minutes for operative time is when the surgery is done under local anesthesia. I've tried using the margins command:
margins, at(age=(18(5)100)) dydx(local)
but this doesn't really seem to work. How can I get the unit change in y for a unit change in x (change in operating time for having surgery under local vs general) when the dependent variable is ln transformed for the regression?
variables
lntor = ln of the operative time
i.local = whether the surgery was done under local or general anesthesia
age = patient age
i.comorbid = a comorbidity score
reg lntor i.local age i.comorbid
the beta coefficient for i.local is -0.12 which I interpret as a semi-elasticity indicating that doing the surgery under local anesthesia reduces total operative time by 12%
I'd like to then know what the actual change in minutes for operative time is when the surgery is done under local anesthesia. I've tried using the margins command:
margins, at(age=(18(5)100)) dydx(local)
but this doesn't really seem to work. How can I get the unit change in y for a unit change in x (change in operating time for having surgery under local vs general) when the dependent variable is ln transformed for the regression?
Comment