erf {dsfa}R Documentation

erf function

Description

Error function, complementary error function, inverse error function,inverse complementary error function and first and second derivative of quantile function of the standard normal distribution.

Usage

erf(x)

erfc(x)

erfinv(x)

erfcinv(x)

pnorm(q, mean = 0, sd = 1, deriv = 0, log.p = FALSE, lower.tail = TRUE)

qnorm(p, mean = 0, sd = 1, deriv = 0, log.p = FALSE, lower.tail = TRUE)

Arguments

x

vector of quantiles.

q

vector of quantiles.

mean

vector of means.

sd

vector of standard deviations.

deriv

derivative of order deriv. Available are 0 and 2.

log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X \le x] otherwise, P[X > x].

p

vector of probabilites.

Details

erf is the error function. erfc is the complementary error function. erfinv is the inverse error function and and erfcinv is the inverse complementary error function. pnorm and qnorm are clones from the stats package, but do have the argument for derivatives.

Value

Returns a vector of the corresponding function evaluated at x.

Functions

Examples

erf(0.5)
erfc(0.5)
erfinv(0.5)
erfcinv(0.5)

qnorm(0.5, deriv=2)
pnorm(0.5, deriv=2)


[Package dsfa version 1.0.1 Index]