15

I use the example provided in confint help page

> fit <- lm(100/mpg ~ disp + hp + wt + am, data=mtcars)
> summary(fit)

Call:
lm(formula = 100/mpg ~ disp + hp + wt + am, data = mtcars)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.6923 -0.3901  0.0579  0.3649  1.2608 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept) 0.740648   0.738594   1.003  0.32487   
disp        0.002703   0.002715   0.996  0.32832   
hp          0.005275   0.003253   1.621  0.11657   
wt          1.001303   0.302761   3.307  0.00267 **
am          0.155815   0.375515   0.415  0.68147   
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 0.6754 on 27 degrees of freedom
Multiple R-squared: 0.8527,     Adjusted R-squared: 0.8309 
F-statistic: 39.08 on 4 and 27 DF,  p-value: 7.369e-11 

> confint(fit)
                   2.5 %      97.5 %
(Intercept) -0.774822875 2.256118188
disp        -0.002867999 0.008273849
hp          -0.001400580 0.011949674
wt           0.380088737 1.622517536
am          -0.614677730 0.926307310
> confint(fit, "wt")
       2.5 %   97.5 %
> wt 0.3800887 1.622518

>confint.default(fit,"wt")
       2.5 %   97.5 %
wt 0.4079023 1.594704

> 1.001303 + 1.96*0.302761
[1] 1.594715
> 1.001303 - 1.96*0.302761
[1] 0.4078914

So the 95% CI obtained from confint.default is based on asymptotic normality. What about for confint?

Thanks

1 Answer 1

20

You can check out the code for each method.

# View code for 'default'
confint.default
# View code of lm objects
getAnywhere(confint.lm)

The difference appears to be that default uses normal quantiles and the method for linear models uses T-quantiles instead.

1
  • Thanks. That clarifies it. With bigger number degrees of freedom, the differences between Normal quantiles and t-quantiles should be negligible.
    – Tony
    Feb 5, 2012 at 1:42

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.