dinvgauss(x, mu, lambda=1, log=FALSE)
pinvgauss(q, mu, lambda=1)
qinvgauss(p, mu, lambda=1, iter=20L, trace=FALSE)
rinvgauss(n, mu, lambda=1)
length(n)
is larger than 1, then length(n)
random values are returned.p
or q
or the number of deviates generated.p
or q
or the number of deviates generated.TRUE
, the log-density is returned.q
from p
.TRUE
then working estimate for q
from each iteration will be printed.x
or q
giving the density (dinvgauss
), probability (pinvgauss
), quantile (qinvgauss
) or random sample (rinvgauss
) for the inverse
Gaussian distribution with mean mu
and inverse dispersion lambda
.
Elements of q
or p
that are missing will cause the corresponding elements of
the result to be missing.dinvGauss
, pinvGauss
, qinvGauss
and rinvGauss
in the SuppDists package.y <- rinvgauss(20,1,2) # generate vector of 20 random numbers
p <- pinvgauss(y,1,2) # p should be uniform
Run the code above in your browser using DataLab