erf_re: Error functions

Description Usage Arguments Details Note References Examples

View source: R/utilities.R

Description

Error functions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

Arguments

x

numeric

Details

erf_re and erfc_re calculate the error function and the complementary error function, respectively; erfc1_re calculates the complementary error function for n=1 (see references), and erfc0_re is equivalent to erfc_re (n=0).

ierf_re and ierfc_re calculate the inverse error function and the inverse complementary error function, respectively.

Note

These generally use pnorm and qnorm; but, where necessary, RcppFaddeeva's implementation (erf, etc.) is used.

References

Error function: http://mathworld.wolfram.com/Erf.html

Inverse error function: http://mathworld.wolfram.com/InverseErf.html

Complementary error function: http://mathworld.wolfram.com/Erfc.html

Inverse complementary error function: http://mathworld.wolfram.com/InverseErfc.html

Examples

1
2
3
4
5
6
7
x <- seq(0,1,by=0.1)
erf_re(x)
erfc_re(x)
ierfc_re(x)

# a known identity
identical(erfc_re(Inf), 0)

abarbour/deform documentation built on Feb. 15, 2022, 6:24 p.m.