# differences between linear regression and generalized linear regression [closed]

I have found the R program of the linear regression for the consumer price index of a country, expressed in terms of years and quarters division. The formula obtained is:

fit<-lm(cpi~yearly+quarter)


so that mathematically it would be something like:

cpi=c0+c1*yearly+c2*quarter


which is a polynomial linear model, for what a think. The correlation is positive and in the graph the slope is positive so it is a growing line. One problem that I have here is the measure of the intercept, according to the authors and the R program, it is a value of -7619.39, why is that? it is pretty big for the cpi values that are from 160 to 174.

Now there is another example that wants to predict the bodyfat based on the measures of the waist, hip, etc.

The formula will be:

myFormula <- DEXfat ~ age + waistcirc + hipcirc + elbowbreadth + kneebreadth


and the authors use a generalized linear model like:

bodyfat.glm <- glm(myFormula, family = gaussian("log"), data = bodyfat)


the question that I have is why the produced model it is not a polynomial case like the one of the cpi? for me both seem the same; and here is using a family of gaussian distributions and R for the simple linear regression uses a normal distribution which is the same. What am I missing here? Thanks

-
Generalized linear regression and generalized linear models are different things. –  Learner Jan 22 '13 at 13:47
sorry, but in what do they differ exactly? I think that generalized linear models use a set of of distributions, am I right? –  Manolo Jan 22 '13 at 13:49
Most importantly, one is an estimation method and the other is a modeling framework. A generalized linear model is one where (to simplify), the conditional expectation of the response is "linked" by some nonlinear transformation to a linear combination of the independent variables. Generalized linear regression is used in linear modes in order to correct for the distribution of the residuals not having a diagonal covariance matrix. –  Learner Jan 22 '13 at 13:57

## closed as off-topic by rschwieb, אליהו צלע, user86418, Sami Ben Romdhane, TooToneFeb 28 at 0:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – אליהו צלע, user86418, Sami Ben Romdhane, TooTone
If this question can be reworded to fit the rules in the help center, please edit the question.