What is the difference between a polynomial regression and a generalized linear model?

2.9k Views Asked by At

I have seen that a polynomial linear regression can have this form:

$y = c_0 + c_1 x_1 + c_2 x_2 + \dots + c_k x_k $

but I have read that the general lineal model which is a form of the multiple linear regression, can have this form:

$Y_i=b_0+b_1X_{i1}+\dots+b_pX_{ip}$

I see that almost both of them are the same. When I program in R the second case, I can use the function abline, that draws a line of "best fit" as it is called. But when I want to use it in the first case (the polynomial one) it is not possible. Why is that? If both returns a set of scattered points over the plane

Examples of both cases:

First case it could be the index of houses bought by clients over years and bimonthly. Second case, a classical one, it would be the weight prediction of a person considering the weight of their hips, arms, etc.

Why I can use abline in the second case, but not in the first one?

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

You seem to be confusing "general" with "generalized". General linear models are linear models. You have $$ Y = X\beta+\varepsilon $$ where

  • $X\in\mathbb R^{n\times k}$ is fixed and observable,
  • $\beta\in\mathbb R^{k\times 1}$ is fixed and unobservable,
  • $\varepsilon\in\mathbb R^{n\times 1}$ is random and unobservable, but you may have assumptions about its distribution, such as homoscedasticity and uncorrelatedness, or sometimes (often) normality and independence,
  • $Y\in\mathbb R^{n\times 1}$ is observable, and of course random.

Among such general linear models is polynomial regression. In that case, the entries $j$th column of $X$ are the $(j-1)$th powers of those in second column.

In these models, the least-squares estimate of $\beta$ is $\hat\beta= (X^TX)^{-1}X^T Y$.

A generalized linear model is not a linear model. You have a link function. For example, in logistic regression you have $$ \operatorname{logit} E(Y) = X\beta, $$ where $X$ and $\beta$ may be as above, and every element of $Y$ is $0$ or $1$, and the logit is of course $\operatorname{logit} p = \log\dfrac{p}{1-p}$. The logit function is the link function. This is not a linear model.

In these models, one usually uses maximum-likelihood estimates found by iterative numerical methods. These are generally not least-squares estimates.