## 3.12 Probability-related functions

### 3.12.1 Normal cumulative distribution functions

The error function erf is related to the standard normal cumulative distribution function $$\Phi$$ by scaling. See section normal distribution for the general normal cumulative distribution function (and its complement).

R erf(T x)
error function, also known as the Gauss error function, of x
Available since 2.0, vectorized in 2.13

R erfc(T x)
complementary error function of x
Available since 2.0, vectorized in 2.13

R inv_erfc(T x)
inverse of the complementary error function of x
Available since 2.29, vectorized in 2.29

R Phi(T x)
standard normal cumulative distribution function of x
Available since 2.0, vectorized in 2.13

R inv_Phi(T x)
Return the value of the inverse standard normal cdf $$\Phi^{-1}$$ at the specified quantile x. The details of the algorithm can be found in . Quantile arguments below 1e-16 are untested; quantiles above 0.999999999 result in increasingly large errors.
Available since 2.0, vectorized in 2.13

R Phi_approx(T x)
fast approximation of the unit (may replace Phi for probit regression with maximum absolute error of 0.00014, see for details)
Available since 2.0, vectorized in 2.13

### References

Bowling, Shannon R., Mohammad T. Khasawneh, Sittichai Kaewkuekool, and Byung Rae Cho. 2009. “A Logistic Approximation to the Cumulative Normal Distribution.” Journal of Industrial Engineering and Management 2 (1): 114–27.
Wichura, Michael J. 1988. “Algorithm AS 241: The Percentage Points of the Normal Distribution.” Journal of the Royal Statistical Society. Series C (Applied Statistics) 37 (3): 477–84. http://www.jstor.org/stable/2347330.