parameters_beta: hook for beta/Gaussian equivalency tricks

View source: R/parameters_beta.R

parameters_betaR Documentation

hook for beta/Gaussian equivalency tricks

Description

The canonical Beta distribution is expressed as

Usage

parameters_beta(dat, ...)

Arguments

dat

a vector of data, purportedly from a Beta distribution

...

additional arguments to be passed on to MASS::fitdistr

Details

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().

Value

     an object of class `fitdistr` (see MASS::fitdistr for more)

See Also

    MASS::fitdistr

Examples


set.seed(1234)
dat <- rbeta(n=1000, 17, 39)
parameters_beta(dat)


VanAndelInstitute/bifurcatoR documentation built on Oct. 13, 2024, 6:29 p.m.