0
$\begingroup$

I have constructed a linear regression model in R using the lm function. I was hoping someone could explain to me why when I run my full model I get an overestimate of the categorical variables. For instance, the intercept - I understand that this means the Biomass when all continuous variables = 0 but also when it is compared to the reference reef (Admiral Reef) and the reference season (Fall) and the reference species (O. annularis).

enter image description here

However, when I run a model with just the categorical variables I get a totally different estimate (and one that is closer to the actual values).

enter image description here

Here are the means for the whole dataset

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Curious on why I was down voted - I searched the site and have found no understandable answers $\endgroup$ – Danib90 Mar 16 '17 at 19:55
  • $\begingroup$ Questions about the interpretation of a statistical analysis belong on Cross Validated, not Stack Overflow because they are not specific programming questions. $\endgroup$ – MrFlick Mar 16 '17 at 19:56
  • $\begingroup$ @MrFlick Apologies - anyway I can migrate it over so I do not duplicate? $\endgroup$ – Danib90 Mar 16 '17 at 19:58
  • 2
    $\begingroup$ The regression coefficient for, say, O. faveolata (the value in the Estimate column) is the predicted difference in Biomass when the species is O. faveolata relative to when the species is O. annularis, with all other variables held fixed. That coefficient (and all the other coefficients) will in general be different between your two models because the first model controls for many more variables than the second model. $\endgroup$ – eipi10 Mar 16 '17 at 20:11
  • 1
    $\begingroup$ The intercept in a linear regression is equal to $\overline{Y} - \overline{X_1}\hat{\beta}_{1,OLS}-\overline{X_2}\hat{\beta}_{2,OLS}-\ldots$. The intercept adjusts so that the estimated regression line passes through the mean of the data. Suppose you include a new variable in a regression and that the new variable has a negative coefficient and a positive mean (to make things easy, assume the other coefficients are not affected). That will move the line down, on average. The intercept will adjust up to keep the line going through the middle of the data. $\endgroup$ – Bill Mar 16 '17 at 23:10
1
$\begingroup$

It's difficult to compare raw group means against the intercept or coefficients in this type of regression with an unbalanced design and multiple predictors. To illustrate, compare your model with only the categorical variables against the overall means for your 3 species. The intercept of 7.42 is already somewhat below the group mean of 8.05 for the reference O.annularis. The difference of 3.17 in raw group means between O.faveolata and O.annularis is very close to the coefficient of 3.29 for O.faveolata, but the difference of -1.52 between group means of O.franksi and O.annularis is quite different from the O.franksi coefficient of -0.09. These discrepancies presumably represent different associations of the 3 species with the other categorical predictors.

This problem will be exacerbated in your model that includes the continuous predictors, as small differences among the species in values of the continuous predictors, near their observed non-zero values, will be magnified in the extrapolation down to values of 0 for the continuous predictors that are required to provide the intercept in this formulation of the problem. You could presumably examine the relations of all continuous predictors to the individual species to understand the detailed reasons why the intercept seems to be so high to you, but that might not be worth the effort. Try instead expressing each value of a continuous predictor as its difference from its overall mean value; I suspect that your distress over the apparent discrepancies will be greatly alleviated.

Finally, please get further expert guidance on how best to deal with your Time variable. A 6th-order non-orthogonal polynomial is probably not the best way to proceed, and it's not clear from the limited data description here how Time and Season would best be considered together for your model.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.