Hello everyone,
I am struggling with the back-transformation of a log-transformed dependent variable. I am analyzing the utilization of a certain policy in hours per month. As there are only a few users and thus many 0, I log-transformed it by adding 1 as a constant and then calculated the log of it for my OLS regression model.
Now I would like to predict the 'real' utilization in hours per month for some combinations of independent variables by calculating margins based on this model.
My question: When I apply the margins command after the regression, how do I need to treat the resulting log+1 values in order to get the real utilization in hours?
My approach to get the total amount of utilization per month (and not just the slope of the independent variable):
- Take the log+1-value from the margins table and exponentiate it: display exp(loghours+1)
- Then subtract 1
- Add the value of the constant (and also back-transform it before)
Am I on the right track here?
I am highly grateful for anyone who can assist me.
Thanks a lot in advance,
Hanna
I am struggling with the back-transformation of a log-transformed dependent variable. I am analyzing the utilization of a certain policy in hours per month. As there are only a few users and thus many 0, I log-transformed it by adding 1 as a constant and then calculated the log of it for my OLS regression model.
Now I would like to predict the 'real' utilization in hours per month for some combinations of independent variables by calculating margins based on this model.
My question: When I apply the margins command after the regression, how do I need to treat the resulting log+1 values in order to get the real utilization in hours?
My approach to get the total amount of utilization per month (and not just the slope of the independent variable):
- Take the log+1-value from the margins table and exponentiate it: display exp(loghours+1)
- Then subtract 1
- Add the value of the constant (and also back-transform it before)
Am I on the right track here?
I am highly grateful for anyone who can assist me.
Thanks a lot in advance,
Hanna
Comment