As we have already seen, sometimes, we have to deal with data that fail linearity and normality.
Transforming variables can help with linearity and normality (for the response variable, since we do not need normality of the predictors).
As we have already seen, sometimes, we have to deal with data that fail linearity and normality.
Transforming variables can help with linearity and normality (for the response variable, since we do not need normality of the predictors).
The most common transformation is the natural logarithm. For the response variable, that is, loge(y) or ln(y).
As we have already seen, sometimes, we have to deal with data that fail linearity and normality.
Transforming variables can help with linearity and normality (for the response variable, since we do not need normality of the predictors).
The most common transformation is the natural logarithm. For the response variable, that is, loge(y) or ln(y).
This is often because it is the easiest to interpret.
As we have already seen, sometimes, we have to deal with data that fail linearity and normality.
Transforming variables can help with linearity and normality (for the response variable, since we do not need normality of the predictors).
The most common transformation is the natural logarithm. For the response variable, that is, loge(y) or ln(y).
This is often because it is the easiest to interpret.
Suppose
ln(yi)=β0+β1xi1+β2xi2+…+βpxip+ϵi.
As we have already seen, sometimes, we have to deal with data that fail linearity and normality.
Transforming variables can help with linearity and normality (for the response variable, since we do not need normality of the predictors).
The most common transformation is the natural logarithm. For the response variable, that is, loge(y) or ln(y).
This is often because it is the easiest to interpret.
Suppose
ln(yi)=β0+β1xi1+β2xi2+…+βpxip+ϵi.
Then it is easy to see that
yi=e(β0+β1xi1+β2xi2+…+βpxip+ϵi)=eβ0×eβ1xi1×eβ2xi2×…×eβpxip×eϵi.
As we have already seen, sometimes, we have to deal with data that fail linearity and normality.
Transforming variables can help with linearity and normality (for the response variable, since we do not need normality of the predictors).
The most common transformation is the natural logarithm. For the response variable, that is, loge(y) or ln(y).
This is often because it is the easiest to interpret.
Suppose
ln(yi)=β0+β1xi1+β2xi2+…+βpxip+ϵi.
Then it is easy to see that
yi=e(β0+β1xi1+β2xi2+…+βpxip+ϵi)=eβ0×eβ1xi1×eβ2xi2×…×eβpxip×eϵi.
That is, the predictors actually have a multiplicative effect on y.
The estimated βj's can be interpreted in terms of approximate proportional differences.
For example, suppose β1=0.10, then eβ1=1.1052.
The estimated βj's can be interpreted in terms of approximate proportional differences.
For example, suppose β1=0.10, then eβ1=1.1052.
Thus, a difference of 1 unit in x1 corresponds to an expected positive difference of approximately 11% in y.
The estimated βj's can be interpreted in terms of approximate proportional differences.
For example, suppose β1=0.10, then eβ1=1.1052.
Thus, a difference of 1 unit in x1 corresponds to an expected positive difference of approximately 11% in y.
Similarly, β1=−0.10 implies eβ1=0.9048, which means a difference of 1 unit in x1 corresponds to an expected negative difference of approximately 10% in y.
The estimated βj's can be interpreted in terms of approximate proportional differences.
For example, suppose β1=0.10, then eβ1=1.1052.
Thus, a difference of 1 unit in x1 corresponds to an expected positive difference of approximately 11% in y.
Similarly, β1=−0.10 implies eβ1=0.9048, which means a difference of 1 unit in x1 corresponds to an expected negative difference of approximately 10% in y.
When making predictions using the regression of the transformed variable, remember to transform back to the original scale to make your predictions more meaningful.
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
Well, it depends on what you are trying to fix.
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
Well, it depends on what you are trying to fix.
For linearity, for example, it is possible to need a logarithm transformation on the response variable but a square root transformation on the one of the predictors, to fix violations of linearity and normality.
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
Well, it depends on what you are trying to fix.
For linearity, for example, it is possible to need a logarithm transformation on the response variable but a square root transformation on the one of the predictors, to fix violations of linearity and normality.
Overall, if you do not know the options to consider, you could try Box-Cox power transformations (to fix non-normality).
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
Well, it depends on what you are trying to fix.
For linearity, for example, it is possible to need a logarithm transformation on the response variable but a square root transformation on the one of the predictors, to fix violations of linearity and normality.
Overall, if you do not know the options to consider, you could try Box-Cox power transformations (to fix non-normality).
We will not spend time on those in this course but I am more than happy to provide resources to anyone who is interested.
While the natural logarithm transformation is the most common, there are several options.
For example, logarithm transformations with other bases, taking squares, taking square roots, etc.
Well, it depends on what you are trying to fix.
For linearity, for example, it is possible to need a logarithm transformation on the response variable but a square root transformation on the one of the predictors, to fix violations of linearity and normality.
Overall, if you do not know the options to consider, you could try Box-Cox power transformations (to fix non-normality).
We will not spend time on those in this course but I am more than happy to provide resources to anyone who is interested.
First, see the boxcox function in R's MASS library.
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |