

And we will learn how to write a least-squares regression equation for the transformed data, as well as how to graph residual plots and determine the coefficient of determination using technology. Together we will look at how to transform data sets using all of the most common linear transformations. Therefore, it’s still important to compare the coefficient of determination for the transformed values with the original values and choose a transformation with a high R-squared value. It is always important to note that the results we obtain are only as good as the transformation model we assume as discussed by UVA.

Well, after applying an exponential transformation, which takes the natural log of the response variable, our data becomes a linear function as seen in the side-by-side comparison of both scatterplots and residual plots. Then, depending on the curved pattern displayed, and whether or not the origin, is a data point, it will allow you to select the best transformation model to achieve linearity.Īnd once we have transformed the sample data to achieve linearity, we can then find the least-squares regression line and verify our results with a residual plot.įor example, notice how the original data below shows a nonlinear relationship. In contrast, the power model would suggest that we log both the x and y variables.ĭetermining the right model to choose is easiest to determine after looking at a scatterplot of the data. For example, if we choose the logarithmic model, we would take the explanatory variable’s logarithm while keeping the response variable the same. We apply one of the desired transformation models to one or both of the variables. x <- seq (0.1,5,length.out 100) set.seed (1) e <- rnorm (100, mean 0, sd 0.2) The first line generates a sequence of 100 values from 0.1 to 5 and assigns it to x. How do we transform the nonlinear quantitative variables to create a linear relationship? In other words, how do we linearize a curved pattern? First we’ll look at a log-transformed dependent variable. What are the common types of transformations to achieve linearity? When observation, theory, or experience suggests that the explanatory and response variables follow a familiar model. Okay, so we know that a lack of linearity implies a lack of association, but is there a way to transform one or both of the variables so that a nonlinear relationship can be changed into a linear relationship?

This means it can help you obtain further insights into your data that may not be obvious at first. It’s one of several methods that you can use to transform datasets to achieve linearity. Jenn, Founder Calcworkshop ®, 15+ Years Experience (Licensed & Certified Teacher)
