Compute Person Parameters for the 1/2/3/4PL model and choose between five common estimation techniques: ML, WL, MAP, EAP and a robust estimation. All item parameters are treated as fixed.
1 2 3 
respm 
An integer matrix, which contains the examinees responses. A persons x items matrix is expected. 
thres 
A numeric vector or a numeric matrix which contains the threshold parameter for each item. If a matrix is submitted, the first row must contain only zeroes! 
slopes 
A numeric vector, which contains the slope parameters for each item  one parameter per item is expected. 
lowerA 
A numeric vector, which contains the lower asymptote parameters (kind of guessing parameter) for each item. 
upperA 
numeric vector, which contains the upper asymptote parameters for each item. 
theta_start 
A vector which contains a starting value for each person. Currently this is necessary to supply, but soon it will be set automatically if nothing is committed. 
mu 
A numeric vector of location parameters for each person in case of MAP or EAP estimation. If nothing is submitted this is set to 0 for each person for MAP estimation. 
sigma2 
A numeric vector of variance parameters for each person in case of MAP or EAP estimation. If nothing is submitted this is set to 1 for each person for MAP estimation. 
type 
Which maximization should be applied? There are five valid entries possible: "mle", "wle", "map", "eap" and "robust". To choose between the methods, or just to get a deeper understanding the papers mentioned below are quite helpful. The default is 
maxsteps 
The maximum number of steps the NR Algorithm will take. Default = 100. 
exac 
How accurate are the estimates supposed to be? Default is 0.001. 
H 
In case 
ctrl 
more controls:

With this function you can estimate:
1PL model (Rasch model) by submitting: the data matrix, item difficulties and nothing else, since the 1PL model is merely a 4PL model with: any slope = 1, any lower asymptote = 0 and any upper asymptote = 1!
2PL model by submitting: the data matrix, item difficulties and slope parameters. Lower and upper asymptotes are automatically set to 0 und 1 respectively.
3PL model by submitting anything except the upper asymptote parameters
4PL model —> submit all parameters ...
The probability function of the 4PL model is:
P(x_{ij} = 1  \hat α_i, \hatβ_i, \hatγ_i, \hatδ_i, θ_j ) = \hatγ_i + (\hatδ_i\hatγ_i) \frac{exp(\hat α_i (θ_{j}  \hatβ_{i}))}{\,1 + exp(\hatα_i (θ_{j}  \hatβ_{i}))}
In our case θ is to be estimated, and the four item parameters are assumed as fixed (usually these are estimates of a former scaling procedure).
The 3PL model is the same, except that δ_i = 1, \forall i.
In the 2PL model δ_i = 1, γ_i = 0, \forall i.
In the 1PL model δ_i = 1, γ_i = 0, α_i = 1, \forall i.
.
The robust estimation method, applies a Hubertype estimator (Schuster & Yuan, 2011), which downweights responses to items which provide little information for the ability estimation. First a residuum is estimated and on this basis, the weight for each observation is computed.
residuum:
r_i = α_i(θ  β_i)
weight:
w(r_i) = 1 \rightarrow if\, r_i ≤q H
w(r_i) = H/r \rightarrow if\, r_i > H
The function returns a list with the estimation results and pretty much everything which has been submitted to fit the model. The estimation results can be found in OBJ$resPP
. The core result is a number_of_persons x 2 matrix, which contains the ability estimate and the SE for each submitted person.
Manuel Reif
Baker, Frank B., and Kim, SeockHo (2004). Item Response Theory  Parameter Estimation Techniques. CRCPress.
Barton, M. A., & Lord, F. M. (1981). An Upper Asymptote for the ThreeParameter Logistic ItemResponse Model.
Birnbaum, A. (1968). Some latent trait models and their use in inferring an examinee's ability. In Lord, F.M. & Novick, M.R. (Eds.), Statistical theories of mental test scores. Reading, MA: AddisonWesley.
Magis, D. (2013). A note on the item information function of the fourparameter logistic model. Applied Psychological Measurement, 37(4), 304315.
Samejima, Fumiko (1993). The bias function of the maximum likelihood estimate of ability for the dichotomous response level. Psychometrika, 58, 195209.
Samejima, Fumiko (1993). An approximation of the bias function of the maximum likelihood estimate of a latent variable for the general case where the item responses are discrete. Psychometrika, 58, 119138.
Schuster, C., & Yuan, K. H. (2011). Robust estimation of latent ability in item response models. Journal of Educational and Behavioral Statistics, 36(6), 720735.
Warm, Thomas A. (1989). Weighted Likelihood Estimation Of Ability In Item Response Theory. Psychometrika, 54, 427450.
Yen, Y.C., Ho, R.G., Liao, W.W., Chen, L.J., & Kuo, C.C. (2012). An empirical evaluation of the slip correction in the four parameter logistic models with computerized adaptive testing. Applied Psychological Measurement, 36, 7587.
PPall, PP_gpcm, JKpp, PV
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98  ################# 4 PL #############################################################
### data creation ##########
set.seed(1522)
# intercepts
diffpar < seq(3,3,length=12)
# slope parameters
sl < round(runif(12,0.5,1.5),2)
la < round(runif(12,0,0.25),2)
ua < round(runif(12,0.8,1),2)
# response matrix
awm < matrix(sample(0:1,10*12,replace=TRUE),ncol=12)
## 1PL model #####
# MLE
res1plmle < PP_4pl(respm = awm,thres = diffpar,type = "mle")
# WLE
res1plwle < PP_4pl(respm = awm,thres = diffpar,type = "wle")
# MAP estimation
res1plmap < PP_4pl(respm = awm,thres = diffpar,type = "map")
# EAP estimation
res1pleap < PP_4pl(respm = awm,thres = diffpar,type = "eap")
# robust estimation
res1plrob < PP_4pl(respm = awm,thres = diffpar,type = "robust")
# summarize results
summary(res1plmle)
summary(res1plwle)
summary(res1plmap)
## 2PL model #####
# MLE
res2plmle < PP_4pl(respm = awm,thres = diffpar, slopes = sl,type = "mle")
# WLE
res2plwle < PP_4pl(respm = awm,thres = diffpar, slopes = sl,type = "wle")
# MAP estimation
res2plmap < PP_4pl(respm = awm,thres = diffpar, slopes = sl,type = "map")
# EAP estimation
res2pleap < PP_4pl(respm = awm,thres = diffpar, slopes = sl,type = "eap")
# robust estimation
res2plrob < PP_4pl(respm = awm,thres = diffpar, slopes = sl,type = "robust")
## 3PL model #####
# MLE
res3plmle < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,type = "mle")
# WLE
res3plwle < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,type = "wle")
# MAP estimation
res3plmap < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,type = "map")
# EAP estimation
res3pleap < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la, type = "eap")
## 4PL model #####
# MLE
res4plmle < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,upperA=ua,type = "mle")
# WLE
res4plwle < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,upperA=ua,type = "wle")
# MAP estimation
res4plmap < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,upperA=ua,type = "map")
# EAP estimation
res4pleap < PP_4pl(respm = awm,thres = diffpar,
slopes = sl,lowerA = la,upperA=ua,type = "eap")
## A special on robust estimation:
# it reproduces the example given in Schuster & KeHai 2011:
diffpar < c(3,2,1,0,1,2,3)
AWM < matrix(0,7,7)
diag(AWM) < 1
res1plmle < PP_4pl(respm = AWM,thres = diffpar, type = "mle")
summary(res1plmle)
res1plrob < PP_4pl(respm = AWM,thres = diffpar, type = "robust")
summary(res1plrob)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.