search for: r_d_lval

Displaying 2 results from an estimated 2 matches for "r_d_lval".

2004 Mar 24
1
R_DT_val accuracy (PR#6692)
Full_Name: M. Welinder Version: 1.8.1 OS: Solaris Submission from: (NULL) (65.213.85.227) Currently R has... #define R_D_Lval(p) (lower_tail ? (p) : (1 - (p))) /* p */ #define R_D_val(x) (log_p ? log(x) : (x)) /* x in pF(x,..) */ #define R_DT_val(x) R_D_val(R_D_Lval(x)) /* x in pF */ ...which is sub-optimal in the lower_tail==FALSE && log_p==TRUE case. Something like this ought to work better. #define R_...
2004 Apr 15
0
phyper accuracy and efficiency (PR#6772)
...AN; if (i * (NR + NB) > n * NR) { /* Swap tails. */ gnm_float oldNB = NB; NB = NR; NR = oldNB; i = n - i - 1; lower_tail = !lower_tail; } if (i < 0) return R_DT_0; d = dhyper (i, NR, NB, n, log_p); pd = pdhyper (i, NR, NB, n, log_p); return log_p ? R_DT_log (d + pd) : R_D_Lval (d * pd); }