View source: R/helper_functions.R
fitbeta | R Documentation |
Fits a beta distribution based on quantiles
fitbeta_ml(point, lci, uci)
fitbeta(point, lci, uci)
point |
Point estimates corresponding to the median |
lci |
Lower limit (quantile 0.025) |
uci |
Upper limit (quantile 0.975) |
parameters shape1 and shape2 of a beta distribution
fitbeta_ml()
: using ML to estimate parameters
fitbeta()
: preserve the expected value
This is a wrap of the fitdist
to obtain
the best parameters for a beta distribution based
on quantiles.
When using confidence intervals (not ML), the shape parameters are obtained using the following formula:
varp = (p_uci-p_lci)/4^2
shape1 = p_mean * (p_mean * (1 - p_mean) / varp - 1)
shape2 =(1 - p_mean) * (p_mean * (1 - p_mean) / varp - 1)
John J. Aponte
fitdist
fitbeta_ml(0.45,0.40,0.50)
fitbeta(0.45,0.40,0.50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.