dbetar: The Beta Distribution in Regression Parameterization

View source: R/betar.R

betarR Documentation

The Beta Distribution in Regression Parameterization

Description

Density, distribution function, quantile function, and random generation for the beta distribution in regression parameterization.

Usage

dbetar(x, mu, phi, log = FALSE)

pbetar(q, mu, phi, lower.tail = TRUE, log.p = FALSE)

qbetar(p, mu, phi, lower.tail = TRUE, log.p = FALSE)

rbetar(n, mu, phi)

Arguments

x, q

numeric. Vector of quantiles.

p

numeric. Vector of probabilities.

n

numeric. Number of observations. If length(n) > 1, the length is taken to be the number required.

mu

numeric. The mean of the beta distribution.

phi

numeric. The precision parameter of the beta distribution.

log, log.p

logical. If TRUE, probabilities p are given as log(p).

lower.tail

logical. If TRUE (default), probabilities are P[X <= x] otherwise, P[X > x].

Details

This is the reparameterization of the beta distribution with mean mu and precision phi, as employed in beta regression. The classic parameterization of the beta distribution is obtained by setting shape1 = mu * phi and shape2 = (1 - mu) * phi, respectively.

Value

dbetar gives the density, pbetar gives the distribution function, qbetar gives the quantile function, and rbetar generates random deviates.

See Also

dbeta, BetaR


betareg documentation built on Sept. 13, 2024, 1:07 a.m.