Michael Friendly
2014-May-07 14:02 UTC
[Rd] historical significance of Pr(>Chisq) < 2.2e-16
Where does the value 2.2e-16 come from in p-values for chisq tests such as those reported below? > Anova(cm.mod2) Analysis of Deviance Table (Type II tests) Response: Freq LR Chisq Df Pr(>Chisq) B 11026.2 1 < 2.2e-16 *** W 7037.5 1 < 2.2e-16 *** Age 886.6 8 < 2.2e-16 *** B:W 3025.2 1 < 2.2e-16 *** B:Age 1130.4 8 < 2.2e-16 *** W:Age 332.9 8 < 2.2e-16 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele Street Web: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA
Presumably from> .Machine$double.eps[1] 2.220446e-16 Whether this means the tail probability is actually that small, or that the routine that computes it can't get any more accuracy than that, you'll have to dig deeper. John .............................................................. John P. Nolan Math/Stat Department 227 Gray Hall, American University 4400 Massachusetts Avenue, NW Washington, DC 20016-8050 jpnolan at american.edu voice: 202.885.3140 web: academic2.american.edu/~jpnolan .............................................................. -----r-devel-bounces at r-project.org wrote: ----- To: r-devel <r-devel at r-project.org> From: Michael Friendly Sent by: r-devel-bounces at r-project.org Date: 05/07/2014 10:02AM Subject: [Rd] historical significance of Pr(>Chisq) < 2.2e-16 Where does the value 2.2e-16 come from in p-values for chisq tests such as those reported below? > Anova(cm.mod2) Analysis of Deviance Table (Type II tests) Response: Freq LR Chisq Df Pr(>Chisq) B 11026.2 1 < 2.2e-16 *** W 7037.5 1 < 2.2e-16 *** Age 886.6 8 < 2.2e-16 *** B:W 3025.2 1 < 2.2e-16 *** B:Age 1130.4 8 < 2.2e-16 *** W:Age 332.9 8 < 2.2e-16 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele Street Web: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA ______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
See ?format.pval cheers, jari oksanen ________________________________________ From: r-devel-bounces at r-project.org [r-devel-bounces at r-project.org] on behalf of Michael Friendly [friendly at yorku.ca] Sent: 07 May 2014 17:02 To: r-devel Subject: [Rd] historical significance of Pr(>Chisq) < 2.2e-16 Where does the value 2.2e-16 come from in p-values for chisq tests such as those reported below? > Anova(cm.mod2) Analysis of Deviance Table (Type II tests) Response: Freq LR Chisq Df Pr(>Chisq) B 11026.2 1 < 2.2e-16 *** W 7037.5 1 < 2.2e-16 *** Age 886.6 8 < 2.2e-16 *** B:W 3025.2 1 < 2.2e-16 *** B:Age 1130.4 8 < 2.2e-16 *** W:Age 332.9 8 < 2.2e-16 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. & Chair, Quantitative Methods York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 4700 Keele Street Web: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA ______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
It may come a time before the pchisq() function had the lower.tail argument. In those days you had the compute the upper tail as 1-pchisq(x2, df). For any eps<2.2e-16 (.Machine$double.eps), 1-eps==1 so 1-(1-eps)==0 so you would get, e.g., > 1-pchisq(100,2) [1] 0 and people would say 'but the p-value is not 0: it may be very small but not zero' so anova's printing functions would say "<2.2e-16" to mollify them. Now we have the lower.tail=FALSE argument > pchisq(100,2,lower.tail=FALSE) [1] 1.92875e-22 and don't need the "<2.2e-16" but no one has seen fit to change things. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, May 7, 2014 at 7:02 AM, Michael Friendly <friendly at yorku.ca> wrote:> Where does the value 2.2e-16 come from in p-values for chisq tests such as > those > reported below? > >> Anova(cm.mod2) > Analysis of Deviance Table (Type II tests) > > Response: Freq > LR Chisq Df Pr(>Chisq) > B 11026.2 1 < 2.2e-16 *** > W 7037.5 1 < 2.2e-16 *** > Age 886.6 8 < 2.2e-16 *** > B:W 3025.2 1 < 2.2e-16 *** > B:Age 1130.4 8 < 2.2e-16 *** > W:Age 332.9 8 < 2.2e-16 *** > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 >> > > -- > Michael Friendly Email: friendly AT yorku DOT ca > Professor, Psychology Dept. & Chair, Quantitative Methods > York University Voice: 416 736-2100 x66249 Fax: 416 736-5814 > 4700 Keele Street Web: http://www.datavis.ca > Toronto, ONT M3J 1P3 CANADA > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel