rFB: Random generator from the flexible beta distribution

View source: R/rgen.R

rFBR Documentation

Random generator from the flexible beta distribution

Description

The function generates random values from the flexible beta distribution, or from the augmented flexible beta distribution.

Usage

rFB(n, mu, phi, p, w, q0 = NULL, q1 = NULL)

Arguments

n

the number of values to generate. If length(n) > 1, the length is taken to be the number required.

mu

the mean parameter. It must lie in (0, 1).

phi

the precision parameter. It must be a real positive value.

p

the mixing weight. It must lie in (0, 1).

w

the normalized distance among clusters. It must lie in (0, 1).

q0

the probability of augmentation in zero. It must lie in (0, 1). In case of no augmentation, it is NULL (default).

q1

the probability of augmentation in one. It must lie in (0, 1). In case of no augmentation, it is NULL (default).

Value

A vector of length n.

References

Di Brisco, A. M., Migliorati, S. (2020). A new mixed-effects mixture model for constrained longitudinal data. Statistics in Medicine, 39(2), 129–145. doi:10.1002/sim.8406

Migliorati, S., Di Brisco, A. M., Ongaro, A. (2018). A New Regression Model for Bounded Responses. Bayesian Analysis, 13(3), 845–872. doi:10.1214/17-BA1079

Examples

rFB(n = 100, mu = .5, phi = 30,p = .3, w = .6)
rFB(n = 100, mu = .5, phi = 30,p = .3, w = .6, q0 = .2, q1 = .1)

FlexReg documentation built on Sept. 29, 2023, 9:06 a.m.