calc_disc_dist_quantile {epiparameter} | R Documentation |
Calculate the quantiles of a probability distribution based on the vector of probabilities and time data (e.g. time since infection)
Description
This function can be used in cases where the data on a fitted
distribution is not openly available and the summary statistics of the
distribution are not reported so the data are scraped from the plot and
the quantiles are needed in order use the extract_param()
function.
Usage
calc_disc_dist_quantile(prob, days, quantile)
Arguments
prob |
A |
days |
A |
quantile |
A single |
Value
A named vector of quantiles.
Examples
prob <- dgamma(seq(0, 10, length.out = 21), shape = 2, scale = 2)
days <- seq(0, 10, 0.5)
quantiles <- c(0.025, 0.975)
calc_disc_dist_quantile(prob = prob, days = days, quantile = quantiles)
[Package epiparameter version 0.4.1 Index]