>>>>> "GS" == Gavin Simpson <[EMAIL PROTECTED]>
>>>>>     on Fri, 28 Feb 2003 13:42:21 -0000 writes:

    GS> format.pval() as in:
    GS> format.pval(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5)

    GS> see ?format for more information

and if you want to make sure not to suffer from unnecessary
precision cancellation, 
use
        pf(S, df1,df2,  lower.tail = FALSE)
instead of
        1 - pf(S, df1,df2,  lower.tail = FALSE)

E.g.

  > pf(180, 2,31, lower.tail = FALSE)
  [1] 8.656982e-18
  > 1 - pf(180, 2,31)
  [1] 0

Martin Maechler <[EMAIL PROTECTED]>     http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16    Leonhardstr. 27
ETH (Federal Inst. Technology)  8092 Zurich     SWITZERLAND
phone: x-41-1-632-3408          fax: ...-1228                   <><


    GS> -----Original Message-----
    GS> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
    GS> On Behalf Of Christoph Lehmann
    GS> Sent: 28 February 2003 13:18
    GS> To: [EMAIL PROTECTED]
    GS> Subject: [R] show numbers not rounded


    GS> how can I show an number not rounded, but in the format, eg. x.xxxx 

    GS> e.g. 
    >> signif(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5)

    GS> shows
    GS> [1] 0

    GS> but I need something like

    GS> [1] 2.2e-16


    GS> thanks
    GS> christoph
    GS> -- 
    GS> Christoph Lehmann                            Phone:  ++41 31 930 93 83 
    GS> Department of Psychiatric Neurophysiology    Mobile: ++41 76 570 28 00
    GS> University Hospital of Clinical Psychiatry   Fax:    ++41 31 930 99 61 
    GS> Waldau                                            [EMAIL PROTECTED] 
    GS> CH-3000 Bern 60            http://www.puk.unibe.ch/cl/pn_ni_cv_cl.html

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to