Hi there, If I do an lm, I get p-vlues as p-value: < 2.2e-16 Suppose am interested in exact value such as p-value = 1.6e-16 (note = and not <) How do I go about it? stephen
On Jul 11, 2005, at 11:47 AM, S.O. Nyangoma wrote:> Hi there, > If I do an lm, I get p-vlues as > > p-value: < 2.2e-16 > > Suppose am interested in exact value such as > > p-value = 1.6e-16 (note = and not <) > > How do I go about it? > > stephen >I think you're seeing a very small p-value after it has been formatted by format.pval. Consider: options(digits = 6) format.pval(0) # [1] "< 2.2e-16" format.pval(0, eps = 1e-20) # [1] "< 1e-20" you could access the p-values you're interested following this example: x <- 1:100 y <- x + rnorm(100, 0, 1) f <- lm(y ~ x) ff <- summary(f) print(ff) ff$coefficients Pvals <- ff$coefficients[, 4] print(Pvals, digits = 20) Hope this helps, Stephen
> This is obtained from F =39540 with df1 = 1, df2 = 7025. > Suppose am interested in exact value such as >If it were really necessary, you would have to move to multiple precision. The gmp R package doesn't seem to yet cover this, but FMLIB (TOMS814, DM Smith) is a multiple precision f90 library that does include the incomplete beta -- it allows one to say for F(1,7025)=39540, P=6.31E-2886 (evaluated using 200 sign. digit arithmetic). Results from R's pf() agree quite closely with the FMLIB results for less extreme values eg> print(pf(1500,1,7025,lower=FALSE), digits=20)[1] 1.3702710894887480597e-297 cf 1.37027108948832580215549799419452388134616261215463681945E-297 | David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v
Hi David, Since I am looking at very extreme values, it appears I will need FMLIB. Is it an R lib? if so which version? How/where can I download it? Regards. ----- Original Message ----- From: David Duffy <David.Duffy at qimr.edu.au> Date: Wednesday, July 13, 2005 9:46 am Subject: [R] exact values for p-values> > This is obtained from F =39540 with df1 = 1, df2 = 7025. > > Suppose am interested in exact value such as > > > > If it were really necessary, you would have to move to multiple > precision. The gmp R package doesn't seem to yet cover this, but > FMLIB(TOMS814, DM Smith) is a multiple precision f90 library thatdoes> include the incomplete beta -- it allows one to say for > F(1,7025)=39540,P=6.31E-2886 (evaluated using 200 sign. digit > arithmetic). Results from > R's pf() agree quite closely with the FMLIB results for less > extreme values > eg > > print(pf(1500,1,7025,lower=FALSE), digits=20) > [1] 1.3702710894887480597e-297 > > cf 1.37027108948832580215549799419452388134616261215463681945E-297 > > > | David Duffy (MBBS PhD) ,-_|\> | email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / > * > | Epidemiology Unit, Queensland Institute of Medical Research > \_,-._/ > | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG > 4D0B994A v > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting- > guide.html
> there is no such thing as an "R lib". > Do you mean "R package"?Yes. I usually refer to them R packages as as libraries, hence the use of lib. Regards. Stephen.> In any case, not it is not (yet). > As David clearly says (a few lines below), it is a 'f90' > library; which means it's "fortran 90" source code that you can > compile and then use. > > I've tried with gfortran (the latest avaiable on debian amd64 > sid) and it quickly ended in a compiler (!) error. > > S> if so which version? How/where can I download it? > > Netlib has all the TOMS (= Transactions Of Mathematical Software) > algorithms. Look for '814'. > > Regards, > Martin > > S> ----- Original Message ----- > S> From: David Duffy <David.Duffy at qimr.edu.au> > S> Date: Wednesday, July 13, 2005 9:46 am > S> Subject: [R] exact values for p-values > > >> > This is obtained from F =39540 with df1 = 1, df2 = 7025. > >> > Suppose am interested in exact value such as > >> > > >> > >> If it were really necessary, you would have to move to multiple > >> precision. The gmp R package doesn't seem to yet cover > this, but > >> FMLIB(TOMS814, DM Smith) is a multiple precision f90 > library that > S> does > >> include the incomplete beta -- it allows one to say for > >> F(1,7025)=39540,P=6.31E-2886 (evaluated using 200 sign. > digit > >> arithmetic). Results from > >> R's pf() agree quite closely with the FMLIB results for > less > >> extreme values > >> eg > >> > print(pf(1500,1,7025,lower=FALSE), digits=20) > >> [1] 1.3702710894887480597e-297 > >> > >> cf > 1.37027108948832580215549799419452388134616261215463681945E-297 > >> > >> > >> | David Duffy (MBBS PhD) > ,- > S> _|\ > >> | email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: - > 0101 / > >> * > >> | Epidemiology Unit, Queensland Institute of Medical > Research > >> \_,-._/ > >> | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG > >> 4D0B994A v > >> > >> ______________________________________________ > >> R-help at stat.math.ethz.ch mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide! http://www.R- > project.org/posting- > >> guide.html > > S> ______________________________________________ > S> R-help at stat.math.ethz.ch mailing list > S> https://stat.ethz.ch/mailman/listinfo/r-help > S> PLEASE do read the posting guide! http://www.R- > project.org/posting-guide.html > > > S> !DSPAM:42d4da2c52151994935952! >