View source: R/parameters_beta.R
parameters_beta | R Documentation |
The canonical Beta distribution is expressed as
parameters_beta(dat, ...)
dat |
a vector of data, purportedly from a Beta distribution |
... |
additional arguments to be passed on to MASS::fitdistr |
X ~ Beta(a, b)
where a > 0 is a shape parameter and b > 0 is another shape parameter.
a
often represents the number of successes and b
the number of failures
in a series of trials, whereupon the Beta represents the conjugate prior for
the binomial distribution where the success probability p
is (a / (a + b)).
The MASS::fitdistr function requires start parameters for a Beta distribution
which we compute via the method of moments and then feed to MASS::fitdistr().
an object of class `fitdistr` (see MASS::fitdistr for more)
MASS::fitdistr
set.seed(1234)
dat <- rbeta(n=1000, 17, 39)
parameters_beta(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.