Description Usage Arguments Examples
Density, distribution function, quantile function and random generation for the cub distribution given parameters pi and xi.
1 2 3 4 5 6 7 |
x, q |
vector of quantiles. |
pi |
uncertainty parameter belongs to |
xi |
feeling parameter belongs to |
m |
the maximum value. |
log |
logical; if TRUE, densities are given as log. |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
n |
number of observations |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # Examples with dcub
dcub(x=4, pi=0.3, xi=0.7, m=5)
dcub(x=1, pi=0.5, xi=0.4, m=8)
dcub(x=c(4, 1), pi=c(0.3, 0.5), xi=c(0.7, 0.4), m=c(5, 8))
# Examples with pcub
# low xi is associated with high ratings
pcub(q=5, pi=0.5, xi=0.2, m=10, lower.tail=FALSE)
# high pi is associated with indecision in choosing
pcub(q=3, pi=0.9, xi=0.5, m=4)
# probability for several quantiles
pcub(q=c(1,3,5), pi=0.3, xi=0.6, m=5)
# Examples with qcub
# low xi is associated with high ratings
qcub(p=0.1, pi=0.5, xi=0.1, m=7, lower.tail=TRUE)
# high pi is associated with indecision in choosing
qcub(p=0.86, pi=0.9, xi=0.5, m=4)
#quantiles for several probabilities
qcub(p=c(1,0.5,0.9), pi=0.3, xi=0.6, m=5)
# Examples with rcub
# Random sample, low xi is associated with high ratings
x <- rcub(n=1000, pi=0.9, xi=0.1, m=5)
barplot(prop.table(table(x)))
# Random sample, low pi is associated with random choices
y <- rcub(n=1000, pi=0.1, xi=0.1, m=5)
barplot(prop.table(table(y)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.