[Rd] P-value printing in print.summary.lm

Setzer.Woodrow@epamail.epa.gov Setzer.Woodrow@epamail.epa.gov
Thu, 17 May 2001 09:47:56 -0400


The P-value for the overall F-statistic is being printed with formatC in
print.summary.lm (at least in R-1.2.3).  This results in P-values of 0,
which I suppose is practically unimportant, but logically offensive.
format.pval() gets around this (indeed, its help page says it was written
for print.summary.lm, though it is not explicitly called there, just in
print.coefmat!).  I'd suggest the following patch to lm.R:

337c337
<           formatC(1 - pf(x$fstatistic[1], x$fstatistic[2],
---
>           format.pval(1 - pf(x$fstatistic[1], x$fstatistic[2],



R. Woodrow Setzer, Jr.                                            Phone:
(919) 541-0128
Experimental Toxicology Division                       Fax:  (919) 541-5394
Pharmacokinetics Branch
NHEERL MD-74; US EPA; RTP, NC 27711

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._