18
Curvilinear Regression

Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Embed Size (px)

Citation preview

Page 1: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Curvilinear Regression

Page 2: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Monotonic but Non-Linear

• The relationship between X and Y may be monotonic but not linear.

• The linear model can be tweaked to take this into account by applying a monotonic transformation to Y, X, or both X and Y.

• Predicting calories consumed from number of persons present at the meal.

Page 3: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

R2 = .584

Page 4: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

R2 = .814

Page 5: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Log Model

Calories

Persons

Page 6: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Polynomial Regression

Page 7: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Aggregation of Ladybugs

• A monotonic transformation will not help here.

• A polynomial regression will.• Copp, N.H. Animal Behavior, 31, 424-430• Subjects = containers, each with 100

ladybugs• Y = number of ladybugs free (not

aggregated)• X = temperature

Page 8: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Polynomial Models

• Quadratic:

• Cubic:

• For each additional power of X added to the model, the regression line will have one more bend.

221

ˆ XbXbaY

33

221

ˆ XbXbXbaY

Page 9: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Using Copp’s Data

• Compute Temp2, Temp3 and Temp4.• Conduct a sequential multiple regression

analysis, entering Temp first, then Temp2, then Temp3, and then Temp4.

• When deciding which model to adopt, consider whether making the model more complex is justified by the resulting increase in R2.

Page 10: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

SAS

• Curvi -- Polynomial Regression, Ladybugs.• Download and run the program.• Refer to it and the output as Professor Karl

goes over the code and the output.

Page 11: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Linear Model, R2 = .615

Page 12: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Quadratic Model, R2=.838

Page 13: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Cubic Model, R2= .861

Page 14: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Which Model to Adopt?

• Adding Temp2 significantly increased R2, by .838-.615 = .223, keep Temp2.

• Adding Temp3 significantly increased R2, by .861-.838 = .023 – does this justify keeping Temp3 ?

• Adding Temp4 did not significantly increase R2.

• Somewhat reluctantly, I went cubic.

Page 15: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

SHIFT

• Shift to the OUTPUT PDF at this point, come back to the slideshow later.

Page 16: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

Multicollinearity

• May be a problem whenever you have products or powers of predictors in the model.

• Center the predictor variables,• Or simply standardize all variables to

mean 0, standard deviation 1.

Page 17: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

I am so Cute

Page 18: Curvilinear Regression. Monotonic but Non-Linear The relationship between X and Y may be monotonic but not linear. The linear model can be tweaked to

SPSS

• See the document for an example of polynomial regression using SPSS.