Computes the Mills ratio.
The Mills ratio here is
dnorm(x) / pnorm(x)
(1 - pnorm(x)) / dnorm(x)).
Some care is needed as
when x is very negative then its value approaches -x.
mills.ratio returns the Mills ratio, and
dnorm(x) * dnorm(x) / pnorm(x).
T. W. Yee
Mills, J. P. (1926). Table of the ratio: area to bounding ordinate, for any portion of normal curve. Biometrika. 18(3/4), 395–400.
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.