Transformations. Transformations to Linearity Many non-linear curves can be put into a linear form by appropriate transformations of the either – the.

Slides:



Advertisements
Similar presentations
Nonlinear models Hill et al Chapter 10. Types of nonlinear models Linear in the parameters. –Includes models that can be made linear by transformation:
Advertisements

Unit 9. Unit 9: Exponential and Logarithmic Functions and Applications.
Correlation and regression
Regression Analysis Module 3. Regression Regression is the attempt to explain the variation in a dependent variable using the variation in independent.
Qualitative Variables and
4-1 Operations Management Forecasting Chapter 4 - Part 2.
P M V Subbarao Professor Mechanical Engineering Department
Lecture 5 HSPM J716. Assignment 4 Answer checker Go over results.
Lecture 5 HSPM J716. Assignment 4 Answer checker Go over results.
AP Statistics Chapters 3 & 4 Measuring Relationships Between 2 Variables.
Multiple Regression [ Cross-Sectional Data ]
Multipe and non-linear regression. What is what? Regression: One variable is considered dependent on the other(s) Correlation: No variables are considered.
N-way ANOVA. 3-way ANOVA 2 H 0 : The mean respiratory rate is the same for all species H 0 : The mean respiratory rate is the same for all temperatures.
5  ECONOMETRICS CHAPTER Yi = B1 + B2 ln(Xi2) + ui
Logarithmic Equations Unknown Exponents Unknown Number Solving Logarithmic Equations Natural Logarithms.
EGR 105 Foundations of Engineering I Fall 2007 – week 7 Excel part 3 - regression.
Chapter 8 Nonlinear Regression Functions. 2 Nonlinear Regression Functions (SW Chapter 8)
Economics 310 Lecture 7 Testing Linear Restrictions.
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 11 Notes Class notes for ISE 201 San Jose State University.
Standard Trend Models. Trend Curves Purposes of a Trend Curve: 1. Forecasting the long run 2. Estimating the growth rate.
Empirical Estimation Review EconS 451: Lecture # 8 Describe in general terms what we are attempting to solve with empirical estimation. Understand why.
Transformations. Transformation (re-expression) of a Variable A very useful transformation is the natural log transformation Transformation of a variable.
Classification and Prediction: Regression Analysis
Lectures 4a,4b: Exponential & Logarithmic Functions 1.(4.1) Exponential & Logarithmic Functions in Biology 2.(4.2) Exponential & Logarithmic Functions:
Calibration & Curve Fitting
Transformations to Achieve Linearity
9 - 1 Intrinsically Linear Regression Chapter Introduction In Chapter 7 we discussed some deviations from the assumptions of the regression model.
ECON 1150, 2013 Functions of One Variable ECON 1150, Functions of One Variable Examples: y = 1 + 2x, y = x Let x and y be 2 variables.
Least-Squares Regression
Regression Analysis Regression analysis is a statistical technique that is very useful for exploring the relationships between two or more variables (one.
Non-Linear Models. Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring.
3/2003 Rev 1 I – slide 1 of 33 Session I Part I Review of Fundamentals Module 2Basic Physics and Mathematics Used in Radiation Protection.
Bivariate Data When two variables are measured on a single experimental unit, the resulting data are called bivariate data. You can describe each variable.
Applications The General Linear Model. Transformations.
Non-Linear Models. Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring.
CISE301_Topic41 CISE301: Numerical Methods Topic 4: Least Squares Curve Fitting Lectures 18-19: KFUPM Read Chapter 17 of the textbook.
Multiple Regression I KNNL – Chapter 6. Models with Multiple Predictors Most Practical Problems have more than one potential predictor variable Goal is.
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 3: Time Series Regression (Ch. 6) Material.
When and why to use Logistic Regression?  The response variable has to be binary or ordinal.  Predictors can be continuous, discrete, or combinations.
Aim: Review functions and their graphs Do Now: 1. Which graph are functions? 2. Write the equations
4-1 Operations Management Forecasting Chapter 4 - Part 2.
Fitting Curves to Data 1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 5: Fitting Curves to Data Terry Dielman Applied Regression.
4.1 Modeling Nonlinear Data.  Create scatter plots of non linear data  Transform nonlinear data to use for prediction  Create residual plots.
Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential
Nonlinear Models. Agenda Omitted Variables Dummy Variables Nonlinear Models Nonlinear in variables Polynomial Regressions Log Transformed Regressions.
NATURAL LOGARITHMS. The Constant: e e is a constant very similar to π. Π = … e = … Because it is a fixed number we can find e 2.
1 Experimental Statistics - week 12 Chapter 12: Multiple Regression Chapter 13: Variable Selection Model Checking.
Non-Linear Models. Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring.
Math 4030 – 11b Method of Least Squares. Model: Dependent (response) Variable Independent (control) Variable Random Error Objectives: Find (estimated)
Some Examples. Example: daily auto accidents in Saskatchewan to 1984 to 1992 Data collected: 1.Date 2.Number of Accidents Factors we want to consider:
Transformations.
Curve Fitting Introduction Least-Squares Regression Linear Regression Polynomial Regression Multiple Linear Regression Today’s class Numerical Methods.
Introduction to Multiple Regression Lecture 11. The Multiple Regression Model Idea: Examine the linear relationship between 1 dependent (Y) & 2 or more.
1.2 Mathematical Models: A Catalog of Essential Functions.
There is a hypothesis about dependent and independent variables The relation is supposed to be linear We have a hypothesis about the distribution of errors.
More on data transformations No recipes, but some advice.
4-1 MGMG 522 : Session #4 Choosing the Independent Variables and a Functional Form (Ch. 6 & 7)
NATURAL LOGARITHMS LESSON 10 – 3 MATH III. THE NUMBER E e is a mathematical constant found throughout math and science. Bell curve distributions Self-supporting.
Chapter 4 Basic Estimation Techniques
Chapter 7. Classification and Prediction
Non-Linear Models Tractable non-linearity Intractable non-linearity
DEPARTMENT OF MATHEMATICS Basic Algebraic equation
Transformations.
MATH 2140 Numerical Methods
Linear regression Fitting a straight line to observations.
Transformations.
Transformations to Achieve Linearity
Lecturer: Ing. Martina Hanová, PhD.
Nonlinear Fitting.
Multivariate Models Regression.
Presentation transcript:

Transformations

Transformations to Linearity Many non-linear curves can be put into a linear form by appropriate transformations of the either – the dependent variable Y or –some (or all) of the independent variables X 1, X 2,..., X p. This leads to the wide utility of the Linear model. We have seen that through the use of dummy variables, categorical independent variables can be incorporated into a Linear Model. We will now see that through the technique of variable transformation that many examples of non-linear behaviour can also be converted to linear behaviour.

Intrinsically Linear (Linearizable) Curves 1 Hyperbolas y = x/(ax-b) Linear form: 1/y = a -b (1/x) or Y =  0 +  1 X Transformations: Y = 1/y, X=1/x,  0 = a,  1 = -b

2. Exponential y =  e  x =  x Linear form: ln y = ln  +  x = ln  + ln  x or Y =  0 +  1 X Transformations: Y = ln y, X = x,  0 = ln ,  1 =  = ln 

3. Power Functions y = a x b Linear from: ln y = lna + blnx or Y =  0 +  1 X

Logarithmic Functions y = a + b lnx Linear from: y = a + b lnx or Y =  0 +  1 X Transformations: Y = y, X = ln x,  0 = a,  1 = b

Other special functions y = a e b/x Linear from: ln y = lna + b 1/x or Y =  0 +  1 X Transformations: Y = ln y, X = 1/x,  0 = lna,  1 = b

Polynomial Models y =  0 +  1 x +  2 x 2 +  3 x 3 Linear form Y =  0 +  1 X 1 +  2 X 2 +  3 X 3 Variables Y = y, X 1 = x, X 2 = x 2, X 3 = x 3

Exponential Models with a polynomial exponent Linear form lny =  0 +  1 X 1 +  2 X 2 +  3 X 3 +  4 X 4 Y = lny, X 1 = x, X 2 = x 2, X 3 = x 3, X 4 = x 4

Trigonometric Polynomial Models y =  0 +  1 cos(2  f 1 x) +  1 sin(2  f 1 x) + … +  k cos(2  f k x) +  k sin(2  f k x) Linear form Y =  0 +  1 C 1 +  1 S 1 + … +  k C k +  k S k Variables Y = y, C 1 = cos(2  f 1 x), S 2 = sin(2  f 1 x), … C k = cos(2  f k x), S k = sin(2  f k x)

Response Surface models Dependent variable Y and two independent variables x 1 and x 2. (These ideas are easily extended to more the two independent variables) The Model (A cubic response surface model) or Y =  0 +  1 X 1 +  2 X 2 +  3 X 3 +  4 X 4 +  5 X 5 +  6 X 6 +  7 X 7 +  8 X 8 +  9 X 9 +  where

The Box-Cox Family of Transformations

The Transformation Staircase

The Bulging Rule x up y up y down x down

Non-Linear Models Nonlinearizable models

Non-Linear Growth models many models cannot be transformed into a linear model The Mechanistic Growth Model Equation: or (ignoring  ) “rate of increase in Y” =

The Logistic Growth Model or (ignoring  ) “rate of increase in Y” = Equation:

The Gompertz Growth Model: or (ignoring  ) “rate of increase in Y” = Equation:

Example: daily auto accidents in Saskatchewan to 1984 to 1992 Data collected: 1.Date 2.Number of Accidents Factors we want to consider: 1.Trend 2.Yearly Cyclical Effect 3.Day of the week effect 4.Holiday effects

Trend This will be modeled by a Linear function : Y =  0 +  1 X (more generally a polynomial) Y =  0 +  1 X +  2 X 2 +  3 X 3 + …. Yearly Cyclical Trend This will be modeled by a Trig Polynomial – Sin and Cos functions with differing frequencies(periods) : Y =  1 sin(2  f 1 X) +  1 cos(2  f 2 X)  1 sin(2  f 2 X) +  2 cos(2  f 2 X) + …

Day of the week effect: This will be modeled using “dummy”variables :  1 D 1 +  2 D 2 +  3 D 3 +  4 D 4 +  5 D 5 +  6 D 6 D i = (1 if day of week = i, 0 otherwise) Holiday Effects Also will be modeled using “dummy”variables :

Independent variables X = day,D1,D2,D3,D4,D5,D6,S1,S2,S3,S4,S5, S6,C1,C2,C3,C4,C5,C6,NYE,HW,V1,V2,cd,T1, T2. Si=sin( *i*day). Ci=cos( *i*day). Dependent variable Y = daily accident frequency

Independent variables ANALYSIS OF VARIANCE SUM OF SQUARES DF MEAN SQUARE F RATIO REGRESSION RESIDUAL VARIABLES IN EQUATION FOR PACC. VARIABLES NOT IN EQUATION STD. ERROR STD REG F. PARTIAL F VARIABLE COEFFICIENT OF COEFF COEFF TOLERANCE TO REMOVE LEVEL. VARIABLE CORR. TOLERANCE TO ENTER LEVEL (Y-INTERCEPT ). day E E IACC D Dths D S D S D S D C D V S V S cd S T C C C C C NYE HW T ***** F LEVELS( 4.000, 3.900) OR TOLERANCE INSUFFICIENT FOR FURTHER STEPPING

D D D D D D Day of the week effects

NYE HW T Holiday Effects

S S S C C C C C Cyclical Effects

Transformations to Linearity Many non-linear curves can be put into a linear form by appropriate transformations of the either – the dependent variable Y or –some (or all) of the independent variables X 1, X 2,..., X p. This leads to the wide utility of the Linear model. We have seen that through the use of dummy variables, categorical independent variables can be incorporated into a Linear Model. We will now see that through the technique of variable transformation that many examples of non-linear behaviour can also be converted to linear behaviour.

Intrinsically Linear (Linearizable) Curves 1 Hyperbolas y = x/(ax-b) Linear form: 1/y = a -b (1/x) or Y =  0 +  1 X Transformations: Y = 1/y, X=1/x,  0 = a,  1 = -b

2. Exponential y = a e bx = aB x Linear form: ln y = lna + b x = lna + lnB x or Y =  0 +  1 X Transformations: Y = ln y, X = x,  0 = lna,  1 = b = lnB

3. Power Functions y = a x b Linear from: ln y = lna + blnx or Y =  0 +  1 X

Logarithmic Functions y = a + b lnx Linear from: y = a + b lnx or Y =  0 +  1 X Transformations: Y = y, X = ln x,  0 = a,  1 = b

Other special functions y = a e b/x Linear from: ln y = lna + b 1/x or Y =  0 +  1 X Transformations: Y = ln y, X = 1/x,  0 = lna,  1 = b

Polynomial Models y =  0 +  1 x +  2 x 2 +  3 x 3 Linear form Y =  0 +  1 X 1 +  2 X 2 +  3 X 3 Variables Y = y, X 1 = x, X 2 = x 2, X 3 = x 3

Exponential Models with a polynomial exponent Linear form lny =  0 +  1 X 1 +  2 X 2 +  3 X 3 +  4 X 4 Y = lny, X 1 = x, X 2 = x 2, X 3 = x 3, X 4 = x 4

Trigonometric Polynomials

 0,  1,  1, …,  k,  k are parameters that have to be estimated, 1, 2, 3, …, k are known constants (the frequencies in the trig polynomial. Note:

Response Surface models Dependent variable Y and two independent variables x 1 and x 2. (These ideas are easily extended to more the two independent variables) The Model (A cubic response surface model) or Y =  0 +  1 X 1 +  2 X 2 +  3 X 3 +  4 X 4 +  5 X 5 +  6 X 6 +  7 X 7 +  8 X 8 +  9 X 9 +  where

The Box-Cox Family of Transformations

The Transformation Staircase

The Bulging Rule x up y up y down x down