Learn R Programming

sn (version 0.4-3)

zeta: Function `log(2*pnorm(x))' and its derivatives

Description

The function log(2*(pnorm(x)) and its derivatives up to order 4.

Usage

zeta(k, x)

Arguments

k
an integer scalar between 0 and 4.
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 4, the derivative of order k of log(2*pnorm(x)) is evaluated, where 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>4, NULL is returned. This function is used by sn.dev and msn.dev, among others.

See Also

sn.mle, msn.mle

Examples

Run this code
y <- zeta(2,seq(-20,20,by=0.5))
#
for(k in 0:4) curve(zeta(k,x), from=-1, to=5, col = k+2, add = k > 0)
legend(3, -0.5, legend=as.character(0:4), col=2:6, lty=1)

Run the code above in your browser using DataLab