Docsity

Polynomial Regression - Lecture Notes | STAT 231B, Study notes of Statistics

Toggle sidebar
bg1
Polynomial Regression
Polynomial regression model may contain one, two or more than two predictor variables.
Further, each predictor variable may be present in various powers. Fitting of polynomial
regression models presents no new problems since they are special cases of the general linear
regression model.
Power Cells Example: A study of the effects of the charge rate
and temperature on the life of a new type of power cell. The
charge rate (X1) was controlled at three levels. The ambient
temperature (X2) was controlled at three levels. Life of power
cell (Y) measured by the number of charge-discharge cycles that
a power cell underwent before it failed.
Start with a second-order polynomial regression model with two predictor variables
Y X X X X X X
i i i i i i i i
0 1 1 2 2 11 1
2
22 2
2
12 1 2
Fitted Second-Order Polynomial Model
Case Summaries
Number
of Cycles
Yi
Charge
Rate X1
Temperature
X2
xi2 x22x1 x2
1
2
3
4
5
6
7
8
9
10
11
150.00
86.00
49.00
288.00
157.00
131.00
184.00
109.00
279.00
235.00
224.00
.60
1.00
1.40
.60
1.00
1.00
1.00
1.40
.60
1.00
1.40
10.00
10.00
10.00
20.00
20.00
20.00
20.00
20.00
30.00
30.00
30.00
1
0
1
1
0
0
0
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
-1
0
0
0
0
0
-1
0
1
10
20X
x
4.0
0.1X
x
2
2
1
1
Use of the new centered and scaled
variables rather than original
variables can reduce the correlation
between the first power and second
power terms.
Correlation between
X1 and X12: 0.991
X2 and X22: 0.986
x1 and x12: 0
x2 and x22: 0
Note there are three repeated
combinations of X1 and X2
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Polynomial Regression - Lecture Notes | STAT 231B and more Study notes Statistics in PDF only on Docsity!

Polynomial Regression

Polynomial regression model may contain one, two or more than two predictor variables.

Further, each predictor variable may be present in various powers. Fitting of polynomial

regression models presents no new problems since they are special cases of the general linear

regression model.

Power Cells Example: A study of the effects of the charge rate and temperature on the life of a new type of power cell. The charge rate ( X 1 ) was controlled at three levels. The ambient temperature ( X 2 ) was controlled at three levels. Life of power cell ( Y ) measured by the number of charge-discharge cycles that a power cell underwent before it failed.

Start with a second-order polynomial regression model with two predictor variables

Yi   0   1 X i 1   2 X i 2   11 X i 1   X i   X i Xi   i

Fitted Second-Order Polynomial Model Case Summaries Number of Cycles Yi Charge Rate X 1 Temperature X 2 xi (^2) x 22 x 1 x 2 **1 2 3 4 5 6 7 8 9 10 11

.

.

.

1 0 1 1 0 0 0 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0**

**- 0 0 0 0 0

0 1**

X 20

x

X 1. 0

x 1 1 2 2

Use of the new centered and scaled variables rather than original variables can reduce the correlation between the first power and second power terms. Correlation between X 1 and X 12 : 0. X 2 and X 22 : 0. x 1 and x 12 : 0 x 2 and x 22 : 0 Note there are three repeated combinations of X1 and X

Residuals Plots

correlation coefficient=0.

Partial Test of the Second-Order Terms (Is first-order model sufficient?). Partial F -Test          

H

H

F

SSR X X X X X X

MSE

SSR X X X X X X SSR X X X

SSR X X X X SSR X X X X X X

F

F

a 0 11 22 12 1 2 2 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 1 2 2 2

     

not all betas

 95 3 5  5 41

F    H      

No curvature and interaction effects are needed.

Fit of First-Order Model First Order Model

Y X X

Y X X

i ^ ^ i ^ i i  i

 0  1 1  2 2 

160.583 41.615 3.859. -139.583 31.665 -.556 -4.408. 7.550 1.267 .751 5.961. (Constant) Charge Rate Temperature Model 1 B Std. Error Unstandardized Coefficients Beta Standar dized Coeffici ents t Sig. Coefficientsa a. Dependent Variable: Number of Cycles  ^  ^     

B t t

s b

s b

Simultaneous 90% CI:

1 2

 

Curvilinear Model with Interaction Effects EY   165  2. 6 X (^) 1  5. 3 log (^) eX (^) 2  . 6 X (^) 1 log eX 2  Curvilinear Model with Interaction Effects y 12 70 180 10 60 190 8 50 200 6 40 X1 X 4 30 2 20 0 10

Body Fat Example The GLM Procedure Dependent Variable: y Sum of Source DF Squares Mean Square F Value Pr > F Model 6 407.6995001 67.9499167 10.07 0. Error 13 87.6899999 6. Corrected Total 19 495. R-Square Coeff Var Root MSE y Mean 0.822988 12.86055 2.597188 20. Source DF Type I SS Mean Square F Value Pr > F x1c 1 352.2697968 352.2697968 52.22 <. x2c 1 33.1689128 33.1689128 4.92 0. x3c 1 11.5459022 11.5459022 1.71 0. x1cx2c 1 1.4957180 1.4957180 0.22 0. x1cx3c 1 2.7043343 2.7043343 0.40 0. x2cx3c 1 6.5148360 6.5148360 0.97 0. Standard Parameter Estimate Error t Value Pr > |t| Intercept 20.52689353 1.07362646 19.12 <. x1c 3.43780807 3.57866572 0.96 0. x2c -2.09471734 3.03676957 -0.69 0. x3c -1.61633724 1.90721068 -0.85 0. x1cx2c 0.00887556 0.03085046 0.29 0. x1cx3c -0.08479084 0.07341774 -1.15 0. x2cx3c 0.09041539 0.09200130 0.98 0. H Ha 0 : 4 5 6 0 :     not all betas = 0 SSRX (^) 1 X (^) 2 X (^) 1 X (^) 3 X (^) 2 X (^) 3 X (^) 1 X (^) 2 X 3  1496 2 704 6 515 10 715 , , | , ,

... .       F SSR X X X X X X X X X

  • (^) MSE , , | , , . ..      1 2 1 3 2 3 1 2 3 3 10 715 3 6 745 53         . . ; ,. ..

05 95 313 3 41 (^53 3 41 ) F F H

Interpretation of Regression Coefficients Model

Y X X

X

X

i i i i i i

1 2

size of firm

if stock company

otherwise

Response Function             E Y X X E Y X X E Y X X                             0 1 1 2 2 0 1 1 2 0 1 1 0 1 1 2 0 2 1 1 0 1 Mutual firms Stock Firms

 2 indicates

how much higher (lower) the response function for stock firms is than

the one for mutual firms, for any given size of firm.

Example 17 151 0 0 26 92 0 0 21 175 0 0 30 31 0 0 22 104 0 0 0 277 0 0 12 210 0 0 19 120 0 0 4 290 0 0 16 238 0 0 28 164 1 164 15 272 1 272 11 295 1 295 38 68 1 68 31 85 1 85 21 224 1 224 20 166 1 166 13 305 1 305 30 124 1 124 14 246 1 246 20 20 20 20

Total N Numbr of Months Elapsed Size of Firm Indicator Code X1X Case Summariesa a. Limited to first 100 cases. 1504.413 2 752.207 72.497 .000b 176.387 17 10. 1680.800 19 Regression Residual Total Model 1 Sum of Squares df Mean Square F Sig. ANOVAa a. Dependent Variable: Numbr of Months Elapsed b. Independent Variables: (Constant), Indicator Code, Size of Firm

Model Containing Interactions Effects

Model

Y X X X X

X

X

i i i i i i i i

1 2

size of firm

if stock company

otherwise

Response Function           ^ ^     E Y X X X X E Y X X E Y X X X                                     0 1 1 2 2 3 1 2 0 1 1 2 3 0 1 1 0 1 1 2 3 1 0 2 1 3 1 0 0 1 Mutual firms Stock Firms Example: Insurance Innovation 1504.419 3 501.473 45.490 .000b 176.381 16 11. 1680.800 19 Regression Residual Total Model 1 Sum of Squares df Mean Square F Sig. ANOVAa a. Dependent Variable: Numbr of Months Elapsed b. Independent Variables: (Constant), X1X2, Size of Firm, Indicator Code 33.838 2.441 13.864. -.102 .013 -.909 -7.779. 8.131 3.654 .443 2.225. -4.2E-04 .018 -.005 -.023. (Constant) Size of Firm Indicator Code X1X Model 1 B Std. Error Unstandardized Coefficients Beta Standar dized Coefficie nts t Sig. Coefficientsa a. Dependent Variable: Numbr of Months Elapsed

More Complex Models

More Complex Models Consider regression of tool wear (Y) on tool speed (X 1 ) and tool model, the latter variables has four classes (M1, M2, M3, M4).

X

X

X

2 3 4

if tool model M

otherwise

if tool model M

otherwise

if tool model M

otherwise

First Order Yi   0   1 X (^) i 1   2 X (^) i 2   3 X (^) i 3   4 Xi 4  i

Qualitative Variable Coding

Tool Model X 1 X 2 X 3 X 4 M1 Xi 1 1 0 0 M2 Xi 1 0 1 0 M3 Xi 1 0 0 1 M4 Xi 1 0 0 0 Response Function           (^)       E Y X X X X E Y X E Y X E Y X E Y X                                

M M M M Models With Qualitative Predictors Only Analysis of Variance Models Analysis of Covariance Models