[R] On p-values presented in the summary of Linear Models
S Ellison
S.Ellison at LGCGroup.com
Fri Feb 8 02:40:21 CET 2013
On 8 Feb 2013, at 01:24, "Antonio Silva" <aolinto.lst at gmail.com> wrote:
> # Two-sided p-value should be estimated with
> dt(t,summary(fit1)$df[2]) # isn't it?
No, on two counts.
>
First, dt is the density; you need pt, the cumulative probability, not dt.
Second, pt(t, ...) would calculate the one sided lower tail probability. You need twice the upper tail probability for a two-sided p-value. Try 2*pt(t, ..., lower.tail=FALSE) (and if thats wrong by a factor of four i've multiplied instead of dividing ... again ....)
S
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
More information about the R-help
mailing list