Description Usage Arguments Details Value Examples
Density, distribution function, quantile function and random generation for the inverse-Gaussian distribution with mean = mu and standard deviation = mu^{3} / lambda. See Table 1 in Cousineau, Brown, & Heathcote (2004) for the equation. kappa assumes 0.
1 2 3 4 5 6 7 |
x, q |
vector of quantiles. |
mu |
vector of mu parameters. |
lambda |
vector of lambda parameters. |
log, log.p |
logical; if TRUE, probabilities p are given as |
lower.tail |
logical; if TRUE, (default), probabilities are P[X ≤ x] otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. |
The inverse-Gaussian is also known as the Wald distribution.
dinvG
gives the density. pinvG
gives the distribtuion
function, qinvG
gives the quantile function, and rinvG
generates random deviates. mu <= 0 or lambda <= 0 is an error.
1 2 3 4 5 6 7 8 9 10 | x <- seq(0, 1, length.out = 1024)
den <- cpda::dinvG(x, mu=.275, lambda=2)
plot(x, den, type = "l", lwd = 2)
## Use Table 3 in Cousineau, Brown, & Heathcote (2004) as an example
n <- 4096
sam <- cpda::rinvG(n, 275, 2000) + 725
hist(sam, freq = FALSE, breaks = "FD", main = "Wald Distribution",
xlab = "RT (ms)", ylab="Density")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.