View source: R/lr_distribution.R
| quantile.lr_dist | R Documentation |
Discrete inverse-CDF quantiles of \log_{10}\mathrm{LR} under
one of the two hypotheses, using R's quantile type-1 definition
Q(p) = \inf\{x : F(x) \ge p\} over the active support.
## S3 method for class 'lr_dist'
quantile(x, probs = c(0, 0.25, 0.5, 0.75, 1), under_h1 = TRUE, ...)
x |
An |
probs |
Numeric vector of probabilities in |
under_h1 |
Logical. If |
... |
Unused. |
Atoms with zero mass under the requested hypothesis are dropped
before the cumulative distribution is formed. A +Inf (or -Inf)
atom is a legitimate quantile value when the requested probability
falls in its mass. An error is raised if no atom has positive mass
under the requested hypothesis.
A named numeric vector of quantiles, one per probs entry.
lr_distribution(), summary.lr_dist(), plot.lr_dist()
d <- as_lr_dist(data.frame(
log10_lr = c(-1, 0, 2),
p_h1 = c(0.1, 0.3, 0.6),
p_h2 = c(0.6, 0.3, 0.1)
))
quantile(d)
quantile(d, probs = c(0.05, 0.95), under_h1 = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.