Hi to all, I found in the R-help archive how to calculate the p-value for a gee result: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/74150.html but there are two questions (I am afraid they are basic questions ...) 1. why is the result multiplicated with 2 2. how could I decide between lower.tail =TRUE and FALSE: example: 2*pnorm(c(1.8691945,0.5882351,2.4903091,1.9287802,2.3172983,2.2092593,2.2625959,1.6395695), lower.tail =TRUE) I did not find anything about lower tail in my books only about one tailed and two tailed. With regards Carmen "Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken" produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/index.html?pid=73025 [[alternative(swapped) HTML version deleted]]
I got an answer for the other question (thank you) But there is another question (I am afraid this is a basic question ...) In this tread there is a hint hwo to calculate the p-vlue of an GEE:> _http://finzi.psych.upenn.edu/R/Rhelp02a/archive/74150.html_ > > Then, get the P values using a normal approximation for the > distribution of z: > > /> 2 * pnorm(abs(coef(summary(fm1))[,5]), lower.tail = FALSE) / > (Intercept) TPTLD 0.00000000 0.041908311. why is the result multiplicated with 2? There is a P-value between 1 and 2 with the results below and multiplicated with 2: 2*pnorm(c(1.8691945,0.5882351,2.4903091,1.9287802,2.3172983,2.2092593,2.2625959,1.6395695), lower.tail =TRUE) Regards Carmen
the recommendation was to use lower.tail=FALSE. b On Jun 11, 2007, at 11:21 AM, Carmen Meier wrote:> I got an answer for the other question (thank you) > > But there is another question (I am afraid this is a basic > question ...) > > In this tread there is a hint hwo to calculate the p-vlue of an GEE: >> _http://finzi.psych.upenn.edu/R/Rhelp02a/archive/74150.html_ >> >> Then, get the P values using a normal approximation for the >> distribution of z: >> >> /> 2 * pnorm(abs(coef(summary(fm1))[,5]), lower.tail = FALSE) / >> (Intercept) TPTLD 0.00000000 0.04190831 > > 1. why is the result multiplicated with 2? There is a P-value > between 1 and 2 > with the results below and multiplicated with 2: > > 2*pnorm(c > (1.8691945,0.5882351,2.4903091,1.9287802,2.3172983,2.2092593,2.2625959 > ,1.6395695), > lower.tail =TRUE) > > Regards Carmen
Benilton Carvalho schrieb:> the recommendation was to use lower.tail=FALSE. > > b > > Obut 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
At 11:21 AM 6/11/2007, Carmen wrote:><snip> >In this tread there is a hint hwo to calculate the p-vlue of an GEE: > > _http://finzi.psych.upenn.edu/R/Rhelp02a/archive/74150.html > > > > Then, get the P values using a normal approximation for the > > distribution of z: > > > > /> 2 * pnorm(abs(coef(summary(fm1))[,5]), lower.tail = FALSE) / > > (Intercept) TPTLD 0.00000000 0.04190831 > >1. why is the result multiplicated with 2? There is a P-value between 1 and 2 >with the results below and multiplicated with 2: > >2*pnorm(c(1.8691945,0.5882351,2.4903091,1.9287802,2.3172983,2.2092593,2.2625959,1.6395695), >lower.tail =TRUE)1. The given in the thread mentioned was: 2 * pnorm(abs(coef(summary(fm1))[,5]), lower.tail = FALSE) 2. The reason for the "2" at the front is to make it an "equal-tails" or "2-sided" confidence interval. Pedantically, you should use 1.96 instead of 2.0 for consistency, but 2.0 = 1.96 rounded to one decimal place. 3. This is what is usually called a "Wald" type confidence interval, as it is simply the normal quantile (+/- 1.96) multiplied by the standard error of estimate to get the +/- widths for the interval. These would be added to the estimate itself to get the final Wald confidence interval, which obviously assumes a normal distribution applies. ===============================================================Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral at lcfltd.com Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239 Fax: 757-467-2947 "Vere scire est per causas scire"
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
Benilton Carvalho schrieb:> 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%) > >Hi Benilton, thank you for your explanations. I seems that the unexpected Data are a result of misunderstanding the arguments of the GEE like |corstr, family or for using the GEE itself. This is a major problem and I must look for any kind of support for the GEE. Thanks Carmen |