dgBetaD | R Documentation |
Generalized Beta distribution for discrete variables.
dgBetaD(x, a = min(x), b = max(x), gam = 1, del = 1, ct = 1)
x |
Vector of quantilies. |
a |
Minimum of range of r.v. X. |
b |
Maximum of range of r.v. X. |
gam |
Gamma parameter. |
del |
Delta parameter. |
ct |
Correction term, default value: 1. |
Let X be a discrete r. v. with range
R_X=\{a,a+1,a+2,…, a+t-1,a+t = b \}
and where a \in \mathrm{N} \cup \{0 \} and t \in \mathrm{N}. The Generalized Discrete Beta Distribution for the r.v. X is defined as follows:
DG(x;a,b,γ,δ)= ≤ft\{ \begin{array}{cl} \frac{G^*(x;a,b,γ,δ)}{∑_{x' \in R_X} G^*(x';a,b,γ,δ)} & x \in R_X\\ 0 & x \notin R_X \end{array} \right.
where G^* is a modified version of the generalized beta distribution dgBeta
defined as
G^*(x;a,b,γ,δ)=\frac{1}{B(γ,δ)(b-a+2c)^{γ+δ-1}} (x-a+c)^{γ-1}(b-x+c)^{δ-1}
Gives the density.
Massimiliano Pastore & Luigi Lombardi
Lombardi, L., Pastore, M. (2014). sgr: A Package for Simulating Conditional Fake Ordinal Data. The R Journal, 6, 164-177.
Pastore, M., Lombardi, L. (2014). The impact of faking on Cronbach's Alpha for dichotomous and ordered rating scores. Quality & Quantity, 48, 1191-1211.
dgBeta
x <- 1:7 GA <- c(1,3,1.5,8); DE <- c(1,3,4,2.5) par(mfrow=c(2,2)) for (j in 1:4) { plot(x,dgBetaD(x,gam=GA[j],del=DE[j]),type="h", panel.first=points(x,dgBetaD(x,gam=GA[j],del=DE[j]),pch=19), main=paste("gamma=",GA[j]," delta=",DE[j],sep=""),ylim=c(0,.6), ylab="dgBetaD(x)") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.