MATH 4780 / MSSC 5780 Regression Analysis
A second-order (degree) polynomial in one variable or a quadratic model is \[y = \beta_0 + \beta_1 x + \beta_2 x^2 + \epsilon\]
A second-order polynomial in two variables is \[y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_{11}x_1^2 + \beta_{22}x_2^2 + \beta_{12}x_1x_2 + \epsilon\]
The \(k\)th-order polynomial model in one variable is \[y = \beta_0 + \beta_1 x + \beta_2 x^2 + \cdots + \beta_kx^k + \epsilon\]
If we set \(x_j = x^j\), this is just a multiple linear regression model with \(k\) predictors \(x_1, x_2, \dots, x_k\)!
Keep the order of the model as low as possible.
Transform data to keep the model 1st order.
If fails, try a 2nd order model.
Avoid higher-order polynomials unless they can be justified for reasons outside the data.
👉 Occam’s Razor: among competing models that predict equally well, choose the “simplest” one, i.e., a parsimonious model.
“Bayesian Deep Learning and a Probabilistic Perspective of Generalization” Wilson and Izmailov (2020) for the rationale of choosing a super high-order polynomial as the regression model.
Model building strategy
👉 Forward selection: successively fit models of increasing order until the \(t\)-test for the highest order term is non-significant.
👉 Backward elimination: fit the highest order model and then delete terms one at a time until the highest order remaining term has a significant \(t\) statistic.
👉 They do not necessarily lead to the same model.
👉 Restrict our attention to low-order polynomials.
Extrapolation
Ill-conditioning
conc_cen <- hardwood$conc - mean(hardwood$conc)
lm(strength ~ conc_cen + I(conc_cen ^ 2), data = hardwood)
Call:
lm(formula = strength ~ conc_cen + I(conc_cen^2), data = hardwood)
Coefficients:
(Intercept) conc_cen I(conc_cen^2)
45.295 2.546 -0.635
SOLUTION: 👉 piecewise polynomial regression that fits separate polynomials over different regions of \(x\).
Example: \[y=\begin{cases} \beta_{01} + \beta_{11}x+ \beta_{21}x^2+\beta_{31}x^3 +\epsilon & \quad \text{if } x < c\\ \beta_{02} + \beta_{12}x+ \beta_{22}x^2+\beta_{32}x^3+\epsilon & \quad \text{if } x \ge c \end{cases}\]
The joint points of pieces are called knots.
With \(K\) different knots, how many different polynomials do we have?
Any issue of piecewise polynomials?
Splines of degree \(k\) are piecewise polynomials of degree \(k\) with continuity in derivatives (smoothing) up to degree \(k-1\) at each knot.
bs()
function in the splines package.