Class and methods for beta distributions in regression specification using the workflow from the distributions3 package.
Usage
BetaR(mu, phi)
Arguments
mu
numeric. The mean of the beta distribution.
phi
numeric. The precision parameter of the beta distribution.
Details
Alternative parameterization of the classic beta distribution in terms of its mean mu and precision parameter phi. Thus, the distribution provided by BetaR is equivalent to the Beta distribution with parameters alpha = mu * phi and beta = (1 - mu) * phi.
## all methods above can either be applied elementwise or for## all combinations of X and x, if length(X) = length(x),## also the result can be assured to be a matrix via drop = FALSEp<-c(0.05, 0.5, 0.95)quantile(X, p, elementwise =FALSE)