Docsity

Nonlinear Regression - Lecture Notes - Introduction to Statistical Methods | STAT 301, Study notes of Data Analysis & Statistical Methods

Toggle sidebar
bg1
30 November
Nonlinear Regression
If we have a curved pattern on a scatterplot, it would not make sense to model it linearly, but
that doesn’t mean there is no relationship between X and Y.
One way to model the relationship is to transform the explanatory variable
i.e., using log (x) or
√
x
in regression instead of x
Model: y = β0 + β1
√
x
+ ε
More common way – polynomial regression
i.e., fit data to y = β0 + β1x + β2x2 + ε
for a quadratic function
Can do polynomial regression using Xk, for k ≥ 1, but we want to include all lower order terms of
X in the model as well.
So if we were to fi a 5 degree polynomial, we would use
^
y
= b0 + b1x + b2x2 + b3x3 + b4x4 + b5x5
Multiple Regression
Sometimes Y is strongly related to several explanatory variables while not having a strong
relationship with any one single explanatory variable.
If we have k predictors, our model is
y = β0 + β1x1 + β2x2 + … + βkxk + ε, εi
iid
N (0, σ2
for k ≥ 1, integer
We fit β0 ≈ b0, β1 ≈ b1, etc., where b0, b1, … bk are the values that minimize
∑
[
(
y−
(
b
0
+b
1
x+…+b
k
x
k
)
)
2
]
=
∑
[
(
y−
^
y
)
2
]
= SSE
Testing the fit of the model
pf3

Partial preview of the text

Download Nonlinear Regression - Lecture Notes - Introduction to Statistical Methods | STAT 301 and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

30 November Nonlinear Regression If we have a curved pattern on a scatterplot, it would not make sense to model it linearly, but that doesn’t mean there is no relationship between X and Y. One way to model the relationship is to transform the explanatory variable

i.e., using log (x) or √ x in regression instead of x

Model: y = β 0 + β 1 √ x + ε

More common way – polynomial regression i.e., fit data to y = β 0 + β 1 x + β 2 x^2 + ε for a quadratic function Can do polynomial regression using Xk, for k ≥ 1, but we want to include all lower order terms of X in the model as well.

So if we were to fi a 5 degree polynomial, we would use ^ y = b 0 + b 1 x + b 2 x^2 + b 3 x^3 + b 4 x^4 + b 5 x^5

Multiple Regression Sometimes Y is strongly related to several explanatory variables while not having a strong relationship with any one single explanatory variable. If we have k predictors, our model is y = β 0 + β 1 x 1 + β 2 x 2 + … + βkxk + ε, εi

iid

N (0, σ^2 for k ≥ 1, integer We fit β 0 ≈ b 0 , β 1 ≈ b 1 , etc., where b 0 , b 1 , … bk are the values that minimize

∑ [( y −( b 0 + b 1 x +^ … + bk xk ) )

2

] = ∑ [( y −^ y )

2

] = SSE

Testing the fit of the model

Is the “overall fit” of our model good? We perform a model utility test. H 0 : β 1 = β 2 = … = βk = 0 HA: At least one βi ≠ 0 for i = 1, …, k Test Statistic:

SSM

k

SSE

MSM

MSE

This follows an F distribution An F-distribution has 2 degrees of freedom df 1 = numerator df df 2 = denominator df So for our test statistic df 1 = k df 2 = n – (k + 1) p-value = P(Fk, n – (k + 1) ≥ teststat) Use Table 6, will have to bound Ex: Suppose k = 4, n = 10, Ftest = 7. df 1 = 4, df 2 = 10 – (4 + 1) = 5 p-value = P(F4,5 ≥ 7.38) So .01 < p-value <. Note When y = β 0 + β 1 x + ε, the model utility test can be performed with an F-test or a t-test and you will get the same p-values.