PRFplot(matrix, respID, h=.09, N.FPts=101,
VarBands=FALSE, VarBands.area=FALSE, alpha=.05,
Xlabel=NA, Xcex=1.5, Ylabel=NA, Ycex=1.5, title=NA, Tcex=1.5,
NA.method="NPModel", Save.MatImp=FALSE,
IP = NULL, IRT.PModel = "2PL", Ability = NULL, Ability.PModel = "ML",
mu = 0, sigma = 1,
message = TRUE)(1-alpha) variability bands? Default is FALSE.(1-alpha) variability bands? Default is FALSE."Hotdeck", "NPModel" (default), and "PModel".IP=NULL). The options available are "1PL", "2PL" (default), and "3PL".matrix.
In case no ability parameters are available then Ability=NULL.Ability=NULL). The options available are "ML" (default), "BM", and "WL".method="BM". Default is 0.method="BM". Default is 1.fd (see package fda):PRF.FDOVarBandsLow.FDOVarBandsHigh.FDOPRFplot displays the so-called nonparametric person response functions (PRFs; Emons, Sijtsma, and Meijer, 2004; Sijtsma and Meijer, 2001), for the respondents identified in respID. The PRF relates item difficulty (0-1 range on the x-axis) with the associated probability of correct response (on the y-axis). The PRF is typically nonincreasing, implying that the probability of answering increasingly difficult items should (at least) not increase. The code is based on nonparametric kernel smoothing (Emons et al., 2004). The value of the PRF at each focal point (representing a difficulty parameter between 0 and 1) is estimated as a weighted sum score, where scores pertaining to items with difficulty close to the focal point are given the largest weights. The weights are functions of the Gaussian kernel function. It is necessary to specify a bandwidth value (h) in order to compute the weights. The h value controls the trade-off between bias and sampling variation (Emons et al., 2004). Small h values reduce bias but increase variance, leading to PRFs that capture too much measurement error. Large h values, on the other hand, increase bias which renders PRFs that are often too flat, thus missing potentially relevant misfitting response behavior. Therefore, it is important to carefuly specify the value h. Emons et al. (2004, pp. 10-13), after a simulation study, advised that "h values between 0.07 and 0.11 are reasonable choices".
Moreover, variability bands of level alpha (0.05 by default) can also be added to the plot. These bands are computed following the jackknife procedure explained in Emons et al. (2004).
The PRFs and variability bands for each respondent are approximated by means of functional data objects (e.g., Ramsay, Hooker, and Graves, 2009), with the help of the fda package. This procedure follows two steps:
matrix are imputed by one of three single imputation methods: Hotdeck imputation (NA.method = "Hotdeck"), nonparametric model imputation (NA.method = "NPModel"), and parametric model imputation (NA.method = "PModel"); see Zhang and Walker (2008).
IRT.PModel = "1PL","2PL", or"3PL"). Item parameters (IP) and ability parameters (Ability) may be provided for this purpose (otherwise the algorithm finds estimates for these parameters).PRFplot returns three functional data objects (for the PRFs, lower-bound of the variability bands, and upper-band of the variability bands) for all respondents in the sample.cutoff, plot.PerFit, flagged.resp# Load the inadequacy scale data (dichotomous item scores):
data(InadequacyData)
# As an example, compute the Ht person-fit scores:
Ht.out <- Ht(InadequacyData)
Ht.out$PFscores
# Determine which respondents were flagged by Ht at 1% level:
set.seed(124) # To fix the random seed generator.
Ht.flagged <- flagged.resp(Ht.out, Blvl=.01, scores=FALSE)
Ht.flagged <- Ht.flagged$PFSscores[,1]
# Flagged respondents: 30 37 46 49 137 216 531.
# Plot the PRFs of the first three flagged respondents:
Flagged <- PRFplot(InadequacyData, respID=Ht.flagged[1:3])
# Plot the person response function of respondent 35 (not flagged as aberrant):
NotFlagged <- PRFplot(InadequacyData, respID=35)
# Plot the PRFs of all respondents:
plot(Flagged$PRF.FDO)Run the code above in your browser using DataLab