fit_metalog | R Documentation |
Functions for fitting and sampling from metalog distribution
fit_metalog(
p,
q,
bl = -Inf,
bu = Inf,
log.p = FALSE,
tol = .Machine$double.eps^2
)
approx_metalog(
q,
nterms = 3L,
bl = -Inf,
bu = Inf,
p = NULL,
thin = FALSE,
n_grid = 1000,
s_grid = 2L,
tol = .Machine$double.eps^2
)
approx_max_metalog(
q,
p = NULL,
bl = -Inf,
bu = Inf,
max_nterms = Inf,
thin = FALSE,
n_grid = 1000,
s_grid = 2L,
tol = 1e-07
)
is_metalog_valid(a, bl = -Inf, bu = Inf, n_grid = 50L, s_grid = 2L)
p |
the grid of probability values the quantiles q correspond to. This would be specified if metalog is fitted to the empirical CDF. Default is NULL. |
q |
vector of quantile values (data) |
bl |
real value of lower boundary (for bounded metalog). Default -Inf |
bu |
real value of upper boundary (for bounded metalog). Default Inf |
log.p |
are probabilities provided on log scale. Default FALSE |
tol |
tolerance for solve() and qr.solve(), default is .Machine$double.eps^2 |
nterms |
integer number of terms for approximating metalog. Default is 3 |
thin |
logical. Should original data be thinned. Default is FALSE. |
n_grid |
in case data thinning is performed, integer number of quantiles to extract from data, if data vector |
s_grid |
in case data thinning is performed, probability grid shape parameter passed to |
max_nterms |
Maximum number of terms to be used for fitting |
a |
vector of |
fit_metalog
is for fitting the metalog function to the set of QP values.
Number of metalog terms will match the number of QP pairs.
approx_metalog
is for approximating metalog function to the set of data.
is_metalog_valid
is a function for checking if the metalog is valid
p <- c(0.1, 0.5, 0.9)
q <- c(4, 9, 12)
fit_metalog(p,q)
a <- c(9, 1.8, -1.13)
is_metalog_valid(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.