.calc_dist_params | R Documentation |
If parameters of a probability distribution are not provided (e.g. when describing the distribution in the literature) and instead summary statistics of a distribution are provided, the parameters can usually be calculated from the summary statistics.
This function can provide a convenient wrapper around
convert_summary_stats_to_params()
and extract_param()
when it is not known which summary statistics can be used to
calculate the parameters of a distribution.
.calc_dist_params(prob_distribution, summary_stats, sample_size)
prob_distribution |
An S3 class containing the probability
distribution or a character string if the parameters of the probability
distribution are unknown but the name of the distribution is known, or |
summary_stats |
A list of summary statistics, use
|
sample_size |
The sample size of the data. Only needed when falling back on using the median-range extraction calculation. |
The hierarchy of methods is:
Conversion is prioritised if the mean and standard deviation are available as these are mostly analytical conversions (except for one of the Weibull conversions).
Next method if possible is extraction from percentiles. This method requires a lower percentile (between(0-50]) and an upper percentile (between (50-100)). If multiple percentiles in each of these ranges is provided the lowest value is used for the calculation.
The last method is the extraction using a median and range of the data.
A named numeric
vector with parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.