| rordbeta {ordbetareg} | R Documentation |
Generate Ordered Beta Variates
Description
This function will generate ordered beta random variates given
values for the mean (mu), dispersion (phi) and cutpoints
governing the ratio of degenerate (discrete) to continuous
responses.
Usage
rordbeta(n = 100, mu = 0.5, phi = 1, cutpoints = c(-1, 1))
Arguments
n |
Number of variates to generate. |
mu |
Value of the mean of the distribution.
Should be in the \(0,1\) interval (cannot be strictly equal to 0 or 1). If
length is greater than 1, should be of length |
phi |
Value of the dispersion parameter. Should be strictly greater than 0. If
length is greater than 1, should be of length |
cutpoints |
A vector of two numeric values for the cutpoints. Second value should be strictly greater than the first value. |
Value
A vector of length n of variates from the ordered beta distribution.
Examples
# generate 100 random variates with an average of 0.7
# all will be in the closed interval \[0,1\]
ordbeta_var <- rordbeta(n=100, mu=0.7, phi=2)
# Will be approx mean = 0.7 with high positive skew
summary(ordbeta_var)
[Package ordbetareg version 0.7.2 Index]