pfakebad | R Documentation |
The function gives the conditional probability of replacement p(f=k|d=h,θ_F) for discrete values in the range 1, …, Q.
pfakebad(k, h = k, p = 0, Q = 5, gam = 1, del = 1)
k |
A fake value. |
h |
An observed original value. |
p |
Overall probability of replacement. |
Q |
Max value in the discrete r.v. range: 1, …, Q. |
gam |
Gamma parameter. |
del |
Delta parameter. |
Gives the conditional probability based on the following equation
p(f=k|d=h,θ_F)= ≤ft\{ \begin{array}{cl} 1 & h=k=1 \\ GD(k;1,h-1,γ,δ) π & 1 ≤q k < h ≤q Q \\ 1-π & 1 < h=k ≤q Q \\ 0 & 1 ≤q h < k ≤q Q \end{array} \right.
with θ_F and GD being the parameter vector (γ,δ,π) and the generalized Beta distribution for discrete variables (dgBetaD
) with bounds a=h+1 and b=Q. The parameter π denotes the probability of faking bad.
Massimiliano Pastore & Luigi Lombardi
Pastore, M., Lombardi, L. (2014). The impact of faking on Cronbach's Alpha for dichotomous and ordered rating scores. Quality & Quantity, 48, 1191-1211.
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) { y <- NULL for (i in x) y <- c(y,pfakebad(x[i],h=5,Q=7,gam=GA[j],del=DE[j],p=.4)) plot(x,y,type="h",panel.first=points(x,y,pch=19), main=paste("gamma=",GA[j]," delta=",DE[j],sep=""),ylim=c(0,.7), ylab="Replacement probability") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.