120 likes | 305 Views
Stat 112: Lecture 12 Notes. Fitting Curvilinear Relationships (Chapter 5): Interpreting the slope coefficients in the log X transformation The log Y – log X transformation. Log Transformation. Interpreting the Coefficient on Log X. Log Transformation of Both X and Y variables.
E N D
Stat 112: Lecture 12 Notes • Fitting Curvilinear Relationships (Chapter 5): • Interpreting the slope coefficients in the log X transformation • The log Y – log X transformation
Log Transformation of Both X and Y variables • It is sometimes useful to transform both the X and Y variables. • A particularly common transformation is to transform X to log(X) and Y to log(Y)
Evaluating Transformed Y Variable Models The log-log transformation provides slightly better predictions than the simple linear regression Model.
Another Example of Transformations: Y=Count of tree seeds, X= weight of tree
By looking at the root mean square error on the original y-scale, we see that Both of the transformations improve upon the untransformed model and that the transformation to log y and log x is by far the best.
Prediction using the log y/log x transformation • What is the predicted seed count of a tree that weights 50 mg? • Math trick: exp{log(y)}=y (Remember by log, we always mean the natural log, ln), i.e.,