Description Usage Arguments Details Value Note Author(s) References See Also Examples
Density, distribution function, quantile function and random generation for the one, two, three and four parameters logistic distributions.
1 2 3 4 5 6 7 8 9 10 |
N |
numeric; number of observations. |
p |
numeric; vector of probability. |
theta |
numeric; vector of person proficiency levels scaled on a normal |
a |
numeric; positive vector of item discrimination parameters. |
b |
numeric; vector of item difficulty parameters. |
c |
numeric; positive vector of item pseudo-guessing parameters (a probability between 0 and 1). |
d |
numeric; positive vector of item inattention parameters (a probability between 0 and 1). |
lower.tail |
logical; if TRUE (default), probabilities are P(X_{j} <= x_{ij}), otherwise, P(X_{j} > x_{ij}). |
log.p |
logical; if TRUE probabilities p are given as log(p). |
The 4 parameters logistic distribution (cdf) is equal to:
P(x_{ij} = 1|θ _j ,a_i ,b_i ,c_i ,d_i ) = c_i + \frac{{d_i - c_i }}{{1 + e^{ - Da_i (θ _j - b_i )} }},
where the parameters are defined in the section arguments and i and j are respectively the items and the persons indices. A normal version of the 4PL model was described by McDonald (1967, p. 67), Barton and Lord (1981), like Hambleton and Swaminathan (1985, p. 48-50).
p4pl |
numeric; gives the distribution function ( |
d4pl |
numeric; gives the density (derivative of p4pl). |
q4pl |
numeric; gives the quantile function (inverse of p4pl). |
r4pl |
numeric; generates theta random deviates. |
Code inspired by the pnorm
function structure from the R base package.
Gilles Raiche, Universite du Quebec a Montreal (UQAM),
Departement d'education et pedagogie
Raiche.Gilles@uqam.ca, http://www.er.uqam.ca/nobel/r17165/
Barton, M. A. and Lord, F. M. (1981). An upper asymptote for the tree-parameter logistic item-response model. Research Bulletin 81-20. Princeton, NJ: Educational Testing Service.
Hambleton, R. K. and Swaminathan, H. (1985). Item response theory - Principles and applications. Boston, Massachuset: Kluwer.
Lord, F. M. and Novick, M. R. (1968). Statistical theories of mental test scores, 2nd edition. Reading, Massacusett: Addison-Wesley.
McDonald, R. P. (1967). Non-linear factor analysis. Psychometric Monographs, 15.
gr4pl
, ggr4pl
, ctt2irt
, irt2ctt
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 37 | ## ....................................................................
# probability of a correct response
p4pl(theta = 3, b = 0)
# Verification of the approximation of N(0,1) by a logistic (D=1.702)
a <- 1; b <- 0; c <- 0; d <- 1; theta <- seq(-4, 4, length = 100)
# D constant 1.702 gives an approximation of a N(0,1) by a logistic
prob.irt <- p4pl(theta, a*1.702, b, c, d)
prob.norm <- pnorm(theta, 0, 1)
plot(theta, prob.irt)
lines(theta, prob.norm, col = "red")
# Maximal difference between the two functions: less than 0.01
max(prob.irt - prob.norm)
# Recovery of the value of the probability of a correct response p4pl()
# from the quantile value q4pl()
p4pl(theta = q4pl(p = 0.20))
# Recovery of the quantile value from the probability of a correct
# response
q4pl(p=p4pl(theta=3))
# Density Functions [derivative of p4pl()]
d4pl(theta = 3, a = 1.702)
theta <- seq(-4, 4, length = 100)
a <- 3.702; b <- 0; c <- 0; d <- 1
density <- d4pl(theta = theta, a = a, b = b, c = c, d = d)
label <- expression("Density - First Derivative")
plot(theta, density, ylab = label, col = 1, type = "l")
lines(theta, dnorm(x = theta, sd = 1.702/a), col = "red", type = "l")
## Generation of proficiency levels from r4pl() according to a N(0,1)
data <- r4pl(N = 10000, a = 1.702, b = 0, c = 0, d = 1)
c(mean = mean(data), sd = sd(data))
## ....................................................................
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.