DPQ0.5-9 package

Density, Probability, Quantile ('DPQ') Computations

hyper2binomP

Transform Hypergeometric Distribution Parameters to Binomial Probabili...

qnormUappr

Approximations to 'qnorm()', i.e., zαz_\alpha

chebyshevPoly

Chebyshev Polynomial Evaluation

dbinom_raw

R's C Mathlib (Rmath) dbinom_raw() Binomial Probability pure R Functio...

dchisqApprox

Approximations of the (Noncentral) Chi-Squared Density

dgamma-utils

Binomial Deviance -- Auxiliary Functions for dgamma() Etc

algdiv

Compute log(gamma(b)/gamma(a+b)) when b >= 8

b_chi

Compute E[chinu]/sqrt(nu)E[chi_nu]/sqrt(nu)useful for t- and chi-Distributions

Bern

Bernoulli Numbers

bpser

pbeta() 'bpser' series computation

dgamma.R

Gamma Density Function Alternatives

dhyperBinMolenaar

HyperGeometric (Point) Probabilities via Molenaar's Binomial Approxima...

dnbinomR

Pure R Versions of R's C (Mathlib) dnbinom() Negative Binomial Probabi...

dnt

Non-central t-Distribution Density - Algorithms and Approximations

dot_D_utils

Distribution Utilities "dpq"

DPQ-package

tools:::Rd_package_title("DPQ")

dpsifn

Psi Gamma Functions Workhorse from R's API

dtWV

Asymptotic Noncentral t Distribution Density by Viechtbauer

expm1x

Accurate exp(x) - 1 - x (for smallish |x|)

format01prec

Format Numbers in [0,1] with "Precise" Result

fr_ld_exp

Base-2 Representation and Multiplication of Numbers

gam1d

Compute 1/Gamma(x+1) - 1 Accurately

gamln1

Compute log( Gamma(x+1) ) Accurately in [-0.2, 1.25]

gammaVer

Gamma Function Versions

Ixpq

Normalized Incomplete Beta Function "Like" pbeta()

lbeta

(Log) Beta and Ratio of Gammas Approximations

lfastchoose

R versions of Simple Formulas for Logarithmic Binomial Coefficients

lgamma1p

Accurate log(gamma(a+1))

lgammaAsymp

Asymptotic Log Gamma Function

log1mexp

Compute loglog(1 - expexp(-a)) and log(1+exp(x))log(1 + exp(x)) Numerically Optimal...

log1pmx

Accurate log(1+x) - x Computation

logcf

Continued Fraction Approximation of Log-Related Power Series

logspace.add

Logspace Arithmetix -- Addition and Subtraction

lssum

Compute Logarithm of a Sum with Signed Large Summands

lsum

Properly Compute the Logarithm of a Sum (of Exponentials)

newton

Simple R level Newton Algorithm, Mostly for Didactical Reasons

numer-utils

Numerical Utilities - Functions, Constants

p1l1

Numerically Stable p1l1(t) = (t+1)*log(1+t) - t

pbetaRv1

Pure R Implementation of Old pbeta()

phyperAllBin

Compute Hypergeometric Probabilities via Binomial Approximations

phyperApprAS152

Normal Approximation to cumulative Hyperbolic Distribution -- AS 152

phyperBin

HyperGeometric Distribution via Approximate Binomial Distribution

phyperBinMolenaar

HyperGeometric Distribution via Molenaar's Binomial Approximation

phyperIbeta

Pearson's incomplete Beta Approximation to the Hyperbolic Distribution

phyperMolenaar

Molenaar's Normal Approximations to the Hypergeometric Distribution

phyperPeizer

Peizer's Normal Approximation to the Cumulative Hyperbolic

phyperR

-only version of 's original phyper() algorithm

phyperR2

Pure R version of R's C level phyper()

phypers

The Four (4) Symmetric 'phyper()' Calls

pl2curves

Plot 2 Noncentral Distribution Curves for Visual Comparison

pnbeta

Noncentral Beta Probabilities

pnchi1sq

(Probabilities of Non-Central Chi-squared Distribution for Special Cas...

pnchisqAppr

(Approximate) Probabilities of Non-Central Chi-squared Distribution

pnchisqWienergerm

Wienergerm Approximations to (Non-Central) Chi-squared Probabilities

pnormAsymp

Asymptotic Approxmation of (Extreme Tail) 'pnorm()'

pnormLU

Bounds for 1-Phi(.) -- Mill's Ratio related Bounds for pnorm()

pnt

Non-central t Probability Distribution - Algorithms and Approximations

pow

X to Power of Y -- R C API R_pow()

pow1p

Accurate (1+x)y(1+x)^y, notably for small x|x|

ppoisson

Direct Computation of 'ppois()' Poisson Distribution Probabilities

pt_Witkovsky_Tab1

Viktor Witosky's Table_1 pt() Examples

qbetaAppr

Compute (Approximate) Quantiles of the Beta Distribution

qbinomR

Pure R Implementation of R's qbinom() with Tuning Parameters

qchisqAppr

Compute Approximate Quantiles of the Chi-Squared Distribution

qgammaAppr

Compute (Approximate) Quantiles of the Gamma Distribution

qnbinomR

Pure R Implementation of R's qnbinom() with Tuning Parameters

qnchisqAppr

Compute Approximate Quantiles of Noncentral Chi-Squared Distribution

qnormAsymp

Asymptotic Approximation to Outer Tail of qnorm()

qnormR

Pure R version of 's qnorm() with Diagnostics and Tuning Parameters

qntR

Pure R Implementation of R's qt() / qnt()

qpoisR

Pure R Implementation of R's qpois() with Tuning Parameters

qtAppr

Compute Approximate Quantiles of the (Non-Central) t-Distribution

qtR

Pure Implementation of 's C-level t-Distribution Quantiles qt()

qtU

'uniroot()'-based Computing of t-Distribution Quantiles

r_pois

Compute Relative Size of i-th term of Poisson Distribution Series

rexpm1

TOMS 708 Approximation REXP(x) of expm1(x) = exp(x) - 1

stirlerr

Stirling's Error Function - Auxiliary for Gamma, Beta, etc

Computations for approximations and alternatives for the 'DPQ' (Density (pdf), Probability (cdf) and Quantile) functions for probability distributions in R. Primary focus is on (central and non-central) beta, gamma and related distributions such as the chi-squared, F, and t. -- For several distribution functions, provide functions implementing formulas from Johnson, Kotz, and Kemp (1992) <doi:10.1002/bimj.4710360207> and Johnson, Kotz, and Balakrishnan (1995) for discrete or continuous distributions respectively. This is for the use of researchers in these numerical approximation implementations, notably for my own use in order to improve standard R pbeta(), qgamma(), ..., etc: {'"dpq"'-functions}.

  • Maintainer: Martin Maechler
  • License: GPL (>= 2)
  • Last published: 2024-08-23