4pl {irtProb}R Documentation

One, Two, Three and Four Parameters Logistic Distributions

Description

Density, distribution function, quantile function and random generation for the one, two, three and four parameters logistic distributions.

Usage

p4pl(theta = 0, a = 1, b = 0, c = 0, d = 1, lower.tail = TRUE, log.p = FALSE)

d4pl(theta = 0, a = 1, b = 0, c = 0, d = 1,                    log.p = FALSE)

q4pl(p  = 0.05, a = 1, b = 0, c = 0, d = 1, lower.tail = TRUE, log.p = FALSE)

r4pl(N  = 100,  a = 1, b = 0, c = 0, d = 1)

Arguments

N numeric; number of observations.
p numeric; vector of probability.
theta numeric; vector of person proficiency levels scaled on a normal z score.
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).

Details

The 4 parameters logistic distribution (cdf) is equal to:

P(x_{ij} = 1|theta _j ,a_i ,b_i ,c_i ,d_i ) = c_i + frac{{d_i - c_i }}{{1 + e^{ - Da_i (theta _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).

Value

p4pl numeric; gives the distribution function (cdf).
d4pl numeric; gives the density (derivative of p4pl).
q4pl numeric; gives the quantile function (inverse of p4pl).
r4pl numeric; generates theta random deviates.

Note

Code inspired by the pnorm function structure from the R base package.

Author(s)

Gilles Raiche, Universite du Quebec a Montreal (UQAM),

Departement d'education et pedagogie

Raiche.Gilles@uqam.ca, http://www.er.uqam.ca/nobel/r17165/

References

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.

See Also

gr4pl, ggr4pl, ctt2irt, irt2ctt

Examples

## ....................................................................
# 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 = 0))
 c(mean = mean(data), sd = sd(data))
## ....................................................................

[Package irtProb version 1.0 Index]