# Load the inadequacy scale data (dichotomous item scores):
data(InadequacyData);
# As an example, compute the Ht person-fit scores:
Ht.PF <- Ht(InadequacyData);
Ht.PF$PFscores
# Compute the cutoff value based on the 1% most extreme scores:
cutoff(Ht.PF,Qlvl=.01);
# Plot the sample distribution of the Ht scores with the above cutoff superimposed:
plot(Ht.PF,Qlvl=.01);
# Determine which respondents were flagged by Ht at 1%:
flagged.resp(InadequacyData,x=Ht.PF,Qlvl=.01);
# Flagged respondents: 30, 37, 46, 49,...
# Plot the person response function of respondent 30 (flagged as aberrant):
PRFplot(InadequacyData,respID=30);
# Plot the person response function of respondent 35 (not flagged as aberrant):
PRFplot(InadequacyData,respID=35);
# Load the physical functioning data (polytomous items scores):
data(PhysFuncData);
# Compute Gnormed.poly:
Gnp.PF <- Gnormed.poly(PhysFuncData,Ncat=3);
# Determine which respondents were flagged at 5%:
flagged.resp(PhysFuncData,x=Gnp.PF);
# Compute lzpoly:
lzpoly(PhysFuncData,Ncat=3)
Run the code above in your browser using DataLab