zeta: Function `log(2*pnorm(x))' and its derivatives
Description
The function log(2*(pnorm(x)) and its derivatives,
including inverse Mills ratio.
Usage
zeta(k, x)
Arguments
k
an integer scalar between 0 and 5.
x
a vector. Missing values (NAs) and Infs are allowed
Value
a vector giving the k-th order derivative evaluated at x
Details
For k between 0 and 5, the derivative of order k
of log(2*pnorm(x)) is evaluated; the derivative of
order k=0 refers to the function itself.
If k is not integer, it is converted to integer and a warning
message is generated.
If k<0< code=""> or k>5, NULL is returned.
The computation for k>1 is reduced to the case k=1, making use
of expressions given by Azzalini and Capitanio (1999). For numerical
stability, the evaluation of zeta(1,x) when x < -50 makes use
of the asymptotic expansion (26.2.13) in Abramowitz and Stegun (1964).
zeta(1,-x) equals dnorm(x)/pnorm(-x) (in principle, apart from
the asymptotic expansion mentioned above), called the
inverse Mills ratio.
0<>
References
Abramowitz, M. and Stegun, I. A., editors (1964).
Handbook of Mathematical Functions.
Dover Publications.
Azzalini, A. and Capitanio, A. (1999).
Statistical applications of the multivariate skew-normal distribution.
Technical report available at http://azzalini.stat.unipd.it/SN.
An abriged version is published in J.Roy.Statist.Soc. B61, 579--602.