# Quantitative and categorial predictor in one model

This is what I would like to know, due to some logical problem behind!

I have a model as:

Crown radius = Diameter at breast height + Location

DBH is quantitative, like 30cm, 40cm... Location is Edge or Forest I understand if I use the summary function, Edge = 0 and Forest =1 as dichotomous dummy variable. I get the following summary:

   lm(formula = CR ~ DBH + Location, data = TA)

Residuals:
Min       1Q   Median       3Q      Max
-1.77367 -0.40927  0.08199  0.55866  1.54157

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.778495   0.349110   5.094 9.88e-06 ***
DBH         0.055476   0.009065   6.120 3.90e-07 ***
LocationF   0.712704   0.288170   2.473    0.018 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.8094 on 38 degrees of freedom
Multiple R-squared:  0.6402,    Adjusted R-squared:  0.6212
F-statistic:  33.8 on 2 and 38 DF,  p-value: 3.678e-09


Hence both variables are signficant. Now the question would be how to extract and interpret the regression equation. In my understanding it would be:

CR = 0.05*DBH + 0.71*Location + 1.78, when Location is 0 = Edge and 1 = Forest.

This strongly contradicts my expectation, indicating that trees in the forest would have a greater crown radius than trees at the edge.

Don't want to go in the details, but do I interpret the output correct?

Is it possible that the estimate of LocationF in the summary table is the difference between LocationE-LocationF= 0.712, so to get the right crown estimates for LocationF=LocationE-0.712, it would rather mean:

CR = 0.05*DBH - 0.71*Location + 1.78

If yes, why doesn't r simply shows a negative estimate?

The model that you consider counter intuitive is the correct one (given the output). I would suggest starting by following the advice from fortune(193):

> library(fortunes)
> fortune(193)

All this becomes even more glaring if you take the unusal step of plotting the
data.
-- Bill Venables (interpreting the results of an ANOVA analysis)
R-help (July 2007)


Plot your data with different symbols for the 2 values of Location and see if indeed the forest values are higher for the given DBH values.

Remember this model does not fit an interaction, or any non-linearity, so if either of those things are in the data, it can really throw off the interpretation of the model.

Also remember that the effect of location is for trees with the exact same DBH, the signs of coefficients can change counter intuitively when included with multiple predictors. See these questions and answers:

Is the model wrong if a coefficient changes from minus in correlation table to plus in OLS?

"Wrong Sign" On Regression Coefficients - Hierarchical Multiple Linear Regression

Why signs of coefficients change when doing multivariate vs. univariate logit regression?

If there is a third predictor (e.g. height) that is related to all of your other variables, but is not included in the model, then that can also affect the sign and magnitude of a coefficient.

• Thanks for the reply. I included other variables as height and the interaction but did a stepwise variable elimination based on the signficance. This is the ultimate model where only the signficant predictors are included. Height cannot explain the crown radius for my data. Also, I plotted the data, and it might be possible that the trees in the forest have a larger crown radius. – Ron James Apr 29 '15 at 16:29