Skip to contents

Density, distribution function, quantile function and random generation for the inverse Gaussian distribution with location mu, and shape shape.

Usage

dinv_gaussian(x, mu = 1, shape = 1, log = FALSE)

pinv_gaussian(q, mu = 1, shape = 1, lower.tail = TRUE, log.p = FALSE)

qinv_gaussian(
  p,
  mu = 1,
  shape = 1,
  lower.tail = TRUE,
  log.p = FALSE,
  tol = 1e-08
)

rinv_gaussian(n, mu = 1, shape = 1)

Arguments

x, q

Vector of quantiles.

mu

Vector of locations.

shape

Vector of shapes.

log

Logical; If TRUE, values are returned on the log scale.

lower.tail

Logical; If TRUE (default), return P(X <= x). Else, return P(X > x) .

log.p

Logical; If TRUE, values are returned on the log scale.

p

Vector of probabilities.

tol

Tolerance of the approximation used in the quantile function. Default 1e-8.

n

Number of draws to sample from the distribution.

Details

The quantile function has no known closed form and is therefore computed numerically via inversion of the cumulative distribution function.

See vignette("brms_families") for details on the parameterization.