3
$\begingroup$

With following model of mpg vs other variables in mtcars dataset:

> mod = lm(mpg~., mtcars)
> 
> summary(mod)

Call:
lm(formula = mpg ~ ., data = mtcars)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4506 -1.6044 -0.1196  1.2193  4.6271 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept) 12.30337   18.71788   0.657   0.5181  
cyl         -0.11144    1.04502  -0.107   0.9161  
disp         0.01334    0.01786   0.747   0.4635  
hp          -0.02148    0.02177  -0.987   0.3350  
drat         0.78711    1.63537   0.481   0.6353  
wt          -3.71530    1.89441  -1.961   0.0633 .
qsec         0.82104    0.73084   1.123   0.2739  
vs           0.31776    2.10451   0.151   0.8814  
am           2.52023    2.05665   1.225   0.2340  
gear         0.65541    1.49326   0.439   0.6652  
carb        -0.19942    0.82875  -0.241   0.8122  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 2.65 on 21 degrees of freedom
Multiple R-squared:  0.869,     Adjusted R-squared:  0.8066 
F-statistic: 13.93 on 10 and 21 DF,  p-value: 0.0000003793

Are the 95% confidence intervals determined by (Estimate +/- 1.96*Std.error)? I just want to confirm that there is no complication here due to multiple regression procedure. I apologize in advance if this is a very basic question.

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, this is how you get confidence intervals even in the multiple regression setting. You might want to type ?confint in your R-console. Due to the small sample size though, they are likely to be wide. Also, if you would like simultaneous confidence intervals for more than one parameter, you might want to use a multiple testing procedure, such as the Bonferroni.

$\endgroup$
5
  • $\begingroup$ Thanks for your answer. There is a small difference in the values obtained by confint() and (estimate +/- 1.96*std_error). Why is that so? The standard error should take into account the sample size. $\endgroup$
    – rnso
    Commented Jun 5, 2015 at 10:52
  • $\begingroup$ @rnso I suspect rounding errors. Yes, the standard errors take into account the sample size, that's why I was expecting them to be quite large in your example. $\endgroup$
    – JohnK
    Commented Jun 5, 2015 at 11:08
  • 1
    $\begingroup$ In this case you multiply by qt(0.975, 21). (obviously for larger samples this tends towards 1.96) $\endgroup$
    – user20650
    Commented Jun 5, 2015 at 15:01
  • $\begingroup$ I'm a bit unclear on how Bonferroni helps in calculating simultaneous confidence intervals (ellipses) - I know it more as a way of correcting $p$ values. Could you elaborate a bit? $\endgroup$ Commented May 3, 2016 at 17:07
  • $\begingroup$ For simultaneous CIs please do not recommend Bonferroni or any other generic adjustment unless you're sure the estimates are approximately independent, for otherwise the results could be terribly wrong. Use the textbook methods (based on the full covariance matrix of estimates) instead. $\endgroup$
    – whuber
    Commented Jul 6, 2018 at 19:53

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.