Comparing Regression Models with and without Data Transformation
Comparing Regression Models with and without Data Transformation
This Demonstration shows the difference between regression models with and without data transformation. The transformed case estimates by minimizing the sum of squared differences between and . The untransformed case estimates by minimizing the sum of squared differences between and .
b
ln(y)
bx
b
y
bx
e
Details
Details
In this Demonstration, we plot the regression model to given data . To find the regression without transforming the data, we need to minimize the sum of the squares of the residuals
y=
bx
e
(,),(,),.…,(,)
x
1
y
1
x
2
y
2
x
n
y
n
S
r
n
∑
i=1
2
-
y
i
b
x
i
e
To find , we minimize with respect to . The value of is hence given by solving the nonlinear equation
b
S
r
b
b
n
∑
i=1
y
i
x
i
b
x
i
e
x
i
2b
x
i
e
To avoid having to solve a nonlinear equation, we can transform the data and then use linear regression formulas to calculate . In this case
b
y=
bx
e
ln(y)=bx
Then is given by minimizing
b
S
r
n
∑
i=1
2
(ln()-b)
y
i
x
i
b=ln()
n
∑
i=1
x
i
y
i
n
∑
i=1
2
x
i
In this Demonstration, we show the regression model curves corresponding to values of from equation (1) (untransformed) and equation (2) (transformed).
b
For more information, see A. Kaw, D. Nguyen, and E. Kalu, Numerical Methods with Applications, 2010.
External Links
External Links
Permanent Citation
Permanent Citation
Vincent Shatlock, Autar Kaw
"Comparing Regression Models with and without Data Transformation"
http://demonstrations.wolfram.com/ComparingRegressionModelsWithAndWithoutDataTransformation/
Wolfram Demonstrations Project
Published: July 20, 2011