This script supports an interactive demonstration of the Box-Cox Power Transformation in the context of a simple linear regression. You can transform the dependent variable, the independent variable, or both. Simply open a data table with an example. (This description uses the Cars 1993 data table from the Sample Data folder.) Then open and run the script. Select the dependent variable and click Y, Response. Select the independent variable and click X, Predictor.
Click OK.
The initial result presents for plots as the main feature. These plots, starting in the upper left and proceeding in clock-wise order, are:
There are two sliders to the right of the plots that determine the current power value for each variable and a report of the R square for the linear regression under the current transformation. R square is initially 0.35 for this example. Drag the slider for each variable until the maximum R square value is achieved.
The R square is now 0.63, the relationship is now essentially linear, and the errors are homoscedastic.
Note that the Box-Cox Power Transformation for the dependent variable is available in the Fit Least Squares platform.
Reference
Box, G. E. P., and D. R. Cox (1964) An Analysis of Transformations, Journal of the Royal Statistical Society, Series B (Methodology), 26(2)211-252.