| Curve Fitting Toolbox | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Changing variables through data transformations may lead to a simplified relationship between the transformed predictor variable and the transformed response. As a result, model descriptions and predictions may be simplified.
Common transformations include the logarithm ln(y), and power functions such as y1/2, y-1, and so on. Using these transformations, you can linearize a nonlinear model, contract response data that spans one or more orders of magnitude, or simplify a model so that it involves fewer coefficients.
Note You must transform variables at the MATLAB command line, and then import those variables into Curve Fitting Toolbox. You cannot transform variables using any of the graphical user interfaces. |
For example, suppose you want to use the following model to fit your data.
![]()
If you decide to use the power transform y-1, then the transformed model is given by
![]()
As another example, the equation
![]()
becomes linear if you take the log transform of both sides.
![]()
You can now use linear least squares fitting procedures.
There are several disadvantages associated with performing transformations:
For the log transformation, negative response values cannot be processed.
For all transformations, the basic assumption that the residual variance is constant is violated. To avoid this problem, you could plot the residuals on the transformed scale. For the power transformation shown above, the transformed scale is given by the residuals
![]()
Note that the residual plot associated with Curve Fitting Tool does not support transformed scales.
Deciding on a particular transformation is not always obvious. However, a scatter plot will often reveal the best form to use. In practice you can experiment with various transforms and then plot the residuals from the command line using the transformed scale. If the errors are reasonable (they appear random with minimal scatter, and don't exhibit any systematic behavior), the transform is a good candidate.
| Curve Fitting Techniques | Filtering and Smoothing | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments