[R] p-value from GEE why factor 2*pnorm?

Benilton Carvalho bcarvalh at jhsph.edu
Mon Jun 11 17:46:59 CEST 2007


Well, AFAIK, the definition of a p-value is the probability of  
observing something at least as extreme as the observed data.

If you observed z, and Z follows a std-normal

p-value = P( Z < -abs(z) ) + P( Z > abs(z) )
   = 2*P ( Z > abs(z) )
   = 2*pnorm(z, lower.tail=FALSE)

try z=0 (you should get 1) and z=1.96 (you should get 5%)

b

On Jun 11, 2007, at 11:34 AM, Carmen Meier wrote:

> Benilton Carvalho schrieb:
>> the recommendation was to use lower.tail=FALSE.
>>
>> b
>>
>> O
> but then the results are significant and this does not match the
> observation.
> The results are matching the observations if the formula is
>
> pnorm(c 
> (1.8691945,0.5882351,2.4903091,1.9287802,2.3172983,2.2092593,2.2625959 
> ,1.6395695),
> lower.tail =TRUE)
>
> so I have any unknown problem .... anywhere :-(
>
> REgards Carmen



More information about the R-help mailing list