[R] Exact p-values in lm() - rounding problem
Ben Bolker
bbolker at gmail.com
Tue Feb 12 14:51:02 CET 2013
Torvon <torvon <at> gmail.com> writes:
>
> Thank you, Uwe.
>
> summary(m1) gives me p-value estimates of:
> (Intercept) 2e-16
> x1 6.9e-15
> x2 1.9e-07
> x3 2.7e-09
>
> While coef(summary(m1))[,4] gives me:
> (Intercept) 3.0e-23
> x1 5.7e-13
> x2 2.6e-07
> x3 1.7e-17
>
> While the first one confirms my suspicion (-23 instead of -16), the latter
> one vary drastically (especially x3 from -09 to -17). Why is that?
This looks fishy. Could we please have a reproducible example?
For example, give us the results of dput(summary(m1)) ...
When I try this with example("lm") it works fine:
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.0320 0.2202 22.850 9.55e-15 ***
groupTrt -0.3710 0.3114 -1.191 0.249
> coef(summary(lm.D9))[,4]
(Intercept) groupTrt
9.547128e-15 2.490232e-01
More information about the R-help
mailing list