[R] approximation to ln \Phi(x)

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 1 08:39:05 CET 2006


On Tue, 31 Jan 2006, Morey, Richard D (UMC-Student) wrote:

> I am using pnorm() with the log.p=T argument to get approximations to ln 
> \Phi(x) and qnorm with the log.p=T argument to get estimates of 
> \Phi^{-1}(exp(x)). What approximations are used in these two functions 
> (I noticed in the source pnorm.c it doesn't look like Abramowitz and 
> Stegen) and where can I find the citation?

?qnorm says

      'qnorm' is based on Wichura's algorithm AS 241 which provides
      precise results up to about 16 digits.

You can also see this at src/nmath/qnorm.c in the sources.

For pnorm.c, the comments describe the origins of the main approximation.

There are other distribution function approximations in R which are based 
on undocumented ideas, but these are fairly well documented, especially 
qnorm.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list