qmetalog | R Documentation |
Functions for sampling from metalog distribution
qmetalog(p, a, bl = -Inf, bu = Inf, log.p = FALSE)
fmetalog(p, a, bl = -Inf, bu = Inf, log.p = FALSE, log = FALSE)
dqmetalog(p, a, bl = -Inf, bu = Inf, log.p = FALSE, log = FALSE)
pmetalog(
q,
a,
bl = -Inf,
bu = Inf,
n_grid = 50L,
s_grid = 2L,
tol = 1e-15,
maxiter = 1000,
log.p = FALSE
)
rmetalog(n, a, bl = -Inf, bu = Inf)
p |
vector of cumulative probabilities corresponding to quantile values |
a |
vector of |
bl |
real value of lower boundary (for bounded metalog). Default -Inf |
bu |
real value of upper boundary (for bounded metalog). Default Inf |
log.p |
should log probability be returned |
log |
should the log density be returned. Default FALSE |
q |
real vector of values |
n_grid |
integer size of helper grid to be passed to |
s_grid |
integer beta shape of helper grid to be passed to |
tol |
tolerance value, default is 1e-6 |
maxiter |
maximum number of iterations for approximation, default is 1e6 |
n |
integer value correponding to number of samples to draw |
qmetalog
is a quantile function.
fmetalog
is a quantile density function q(u).
dqmetalog
is the reciprocal of it is density quantile function f(Q(p)).
pmetalog
is an approximation of the cumulative density function.
rmetalog
is an RNG.
a <- c(9, 1.8, -1.13)
p <- c(0.1, 0.5, 0.9)
qmetalog(p, a)
fmetalog(p, a)
dqmetalog(p, a)
x <- c(5, 9, 14)
pmetalog(x, a)
a <- c(2.4, 0.4, -0.08)
rmetalog(100, a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.