2
$\begingroup$
  1. In the example linear regression below, how do I interpret the (Intercept) with this R output?

A) Does the (Intercept) line represent pop1?

B) Does the Estimate column indicate the slope or the intercept for the (Intercept)? I get the irony of this question as it is called the intercept, but the numbers seems to indicate that the (Intercept) line represents the significance of slope for pop1 but I am not certain if is this correct so I have to ask.

> #in this example there are 6 doses given to 3 populations and sampled for an outcome.
> pop <- as.factor (c(1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3))
> test.doses <- c(0, 1, 2, 4, 8, 16)
> dose <- c(test.doses, test.doses, test.doses)
> outcome <- c(1, 2, 3, 5, 6, 7, 2, 3, 6, 7, 7, 6, 2, 2, 2, 2, 2, 2)
> 
> Model <- lm (outcome ~ dose * pop)
> summary (Model)

Call:
lm(formula = outcome ~ dose * pop)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.1714 -0.7569  0.0000  0.7781  2.0581 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)  2.17143    0.74992   2.896  0.01344 * 
dose         0.35392    0.09948   3.558  0.00394 **
pop2         2.00000    1.06055   1.886  0.08375 . 
pop3        -0.17143    1.06055  -0.162  0.87428   
dose:pop2   -0.16129    0.14068  -1.147  0.27393   
dose:pop3   -0.35392    0.14068  -2.516  0.02712 * 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.338 on 12 degrees of freedom
Multiple R-squared:  0.7369,    Adjusted R-squared:  0.6273 
F-statistic: 6.722 on 5 and 12 DF,  p-value: 0.003318
```
$\endgroup$

1 Answer 1

4
$\begingroup$

Yes, R's output multiple regression can be tricky to understand at first.
Think about this way when pop =1 (the first categorical value) you can drop all of the terms with pop2 and pop3 so you linear regression equation is:

response =  2.17 + 0.35 *dose

Now if pop =2 you need to add the terms for which contain the pop2.

response =  2.17 + 0.35 *dose + (2.0 + -0.16*dose)
         or (2.17 + 2.0) + (0.35 -.16) *dose

And do the same when pop=3. Add the pop3 terms and drop the pop2 terms:

response =  2.17 + 0.35 *dose + (-0.17 + -.35 * dose)
         or (2.17 -.17) + (0.35 - .35) *dose

So all put together your equation is:

response =  2.17 + 0.35 *dose + 
            (2.0 + -0.16*dose)[When pop=2] + 
            (-0.17 + -.35 * dose)[When pop=3]

So in this case you have 3 different intercepts and 3 different slopes to correspond to when pop= 1, 2 or 3.

$\endgroup$
6
  • $\begingroup$ Thanks Dave2e this information is extremely helpful describe the lines for each pop based on the output. I have a follow up question. In the example above, can we statistically show (A) (Intercept) effect (0.013), (B) a dose effect (0.003), (C) and a dose:pop3 effect (0.02712). How best do we interpret each one of these effects? $\endgroup$
    – JamesC
    Commented Oct 8, 2021 at 23:08
  • $\begingroup$ I am not sure I fully understand your question. The R output is showing the statistical significancy of each term. From the original table the slope and intercept are significant factors along with the coefficient for pop3 slope contribution. It might be easier to understand it if you split your data set by pop and perform a linear regression on each split. $\endgroup$
    – Dave2e
    Commented Oct 8, 2021 at 23:16
  • $\begingroup$ I'm sorry Dave2e I should have stated the question(s). (1) Can I use this outcome as a predictor for dose? (2) What conclusions about each population can be concluded from this output? (3) Are the populations behaving the same? (FYI, the real life experiment has more replicates plus I'd predict that the data fits the linear model better than this example.) $\endgroup$
    – JamesC
    Commented Oct 8, 2021 at 23:35
  • $\begingroup$ Question 1, yes you can use this to predict the outcome given a dose as input. R2 at .6 is a strong correlation. Question 3: I say yes 1&2 are similar, pop3 is different. Question 2 is based on your experience, expertise and understanding the source of the data. I do recommend splitting your data and performing the regression on each part, the exercise should make it clearer. $\endgroup$
    – Dave2e
    Commented Oct 8, 2021 at 23:47
  • $\begingroup$ Thank you. I will try separating the data, although I am not sure how to compare slopes among populations when run in separate regressions. If all 3 populations are significant for a dose response they could still be responding differently. Do you have any suggestions? $\endgroup$
    – JamesC
    Commented Oct 8, 2021 at 23:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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