mills.ratio | R Documentation |
Computes the Mills ratio.
mills.ratio(x)
mills.ratio2(x)
x |
Numeric (real). |
The Mills ratio here is dnorm(x) / pnorm(x)
(some use (1 - pnorm(x)) / dnorm(x)
).
Some care is needed as x
approaches -Inf
;
when x
is very negative then its value approaches -x
.
mills.ratio
returns the Mills ratio, and
mills.ratio2
returns 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.
Normal
,
tobit
,
cens.poisson
.
## Not run:
curve(mills.ratio, -5, 5, col = "orange", las = 1)
curve(mills.ratio, -5, 5, col = "orange", las = 1, log = "y")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.