Description Usage Arguments Details Value Author(s) References See Also Examples
Plot the nonparametric person response function with variability bands.
1 2 3 4 5 6 7 |
matrix |
Data matrix of dichotomous item scores: Persons as rows, items as columns, item scores are either 0 or 1, missing values allowed. |
respID |
Vector specifying the respondents for whom PRFs are to be computed. |
h |
Bandwidth value. Default is 0.09. |
N.FPts |
Number of (equidistant) focal points in the [0,1] interval. Default is 101. |
VarBands |
Logical: Draw the |
VarBands.area |
Logical: Draw the area between the |
alpha |
Significance level for the variability bands. Default is 0.05. |
Xlabel |
Define label of x-axis, otherwise a default label is shown. |
Xcex |
Font size of the label of x-axis. |
Ylabel |
Define label of y-axis, otherwise a default label is shown. |
Ycex |
Font size of the label of y-axis. |
title |
Define the title of the plot, otherwise a default title is shown. |
Tcex |
Font size of the title of the plot. |
NA.method |
Method to deal with missing values. The default is pairwise elimination ( |
Save.MatImp |
Logical. Save (imputted) data matrix to file? Default is FALSE. |
IP |
Matrix with previously estimated item parameters: One row per item, and three columns ([,1] item discrimination; [,2] item difficulty; [,3] lower-asymptote, also referred to as pseudo-guessing parameter). In case no item parameters are available then |
IRT.PModel |
Specify the IRT model to use in order to estimate the item parameters (only if |
Ability |
Vector with previoulsy estimated latent ability parameters, one per respondent, following the order of the row index of In case no ability parameters are available then |
Ability.PModel |
Specify the method to use in order to estimate the latent ability parameters (only if |
mu |
Mean of the apriori distribution. Only used when |
sigma |
Standard deviation of the apriori distribution. Only used when |
message |
Display prompt message (one per person)? Default is TRUE. |
Function PRFplot
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:
Compute a B-splines basis system. This basis consists of a set of (thirteen) piecewise polinomials, all of degree three/order four (i.e., cubic polinomial segments), with one knot per break point. This allows any two consecutive splines, sp1 and sp2, with common break point BP, verifying sp1(BP) = sp2(BP), sp1'(BP) = sp2'(BP), and sp1”(BP) = sp2”(BP). At 0 and 1 (extremes of the x-range), four (= order) knots are used.
Specify coefficients c for the B-splines basis system computed above and then create functional data objects. Based on smoothing using regression analysis (Ramsay et al., 2009, section 4.3).
Missing values in matrix
are dealt with by means of pairwise elimination by default. Alternatively, single imputation is also available. Three single imputation methods exist: Hotdeck imputation (NA.method = "Hotdeck"
), nonparametric model imputation (NA.method = "NPModel"
), and parametric model imputation (NA.method = "PModel"
); see Zhang and Walker (2008).
Hotdeck imputation replaces missing responses of an examinee ('recipient') by item scores from the examinee which is closest to the recipient ('donor'), based on the recipient's nonmissing item scores. The similarity between nonmissing item scores of recipients and donors is based on the sum of absolute differences between the corresponding item scores. The donor's response pattern is deemed to be the most similar to the recipient's response pattern in the group, so item scores of the former are used to replace the corresponding missing values of the latter. When multiple donors are equidistant to a recipient, one donor is randomly drawn from the set of all donors.
The nonparametric model imputation method is similar to the hotdeck imputation, but item scores are generated from Bernoulli distributions with probabilities defined by donors with similar total score than the recipient (based on all items except the NAs).
The parametric model imputation method is similar to the hotdeck imputation, but item scores are generated from Bernoulli distributions with probabilities estimated by means of parametric IRT models (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.
The output is a list with three functional data objects of class fd
(see package fda
):
|
Functional data object of the PRFs for the entire sample. |
|
Functional data object of the lower-bound of the variability bands for the entire sample. |
|
Functional data object of the upper-bound of the variability bands for the entire sample. |
Jorge N. Tendeiro tendeiro@hiroshima-u.ac.jp
Emons, W. M., Sijtsma, K., and Meijer, R. R. (2004) Testing hypotheses about the person-response function in person-fit analysis. Multivariate Behavioral Research, 39(1), 1–35.
Ramsay, J. O., Hooker, G., and Graves, S. (2009) Functional data analysis with R and MATLAB. New York: US.
Sijtsma, K., and Meijer, R. R. (2001) The person response function as a tool in person-fit research. Psychometrika, 66(2), 191–207.
Zhang, B., and Walker, C. M. (2008) Impact of missing data on person-model fit and person trait estimation. Applied Psychological Measurement, 32(6), 466–479.
cutoff
, plot.PerFit
, flagged.resp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # 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):
PRFplot(InadequacyData, respID=35)
# Plot the PRFs of all respondents:
plot(Flagged$PRF.FDO)
|
Loading required package: ltm
Loading required package: MASS
Loading required package: msm
Loading required package: polycor
Loading required package: mirt
Loading required package: stats4
Loading required package: lattice
Attaching package: ‘mirt’
The following object is masked from ‘package:ltm’:
Science
Warning message:
no DISPLAY variable so Tk is not available
PFscores
1 0.1207
2 0.2561
3 0.2138
4 0.0453
5 0.1292
6 0.0554
7 0.1137
8 0.3191
9 0.1819
10 0.0784
11 0.2922
12 0.1812
13 0.0526
14 0.1223
15 0.2434
16 0.0750
17 0.0174
18 0.2634
19 0.1358
20 0.1084
21 0.2259
22 0.2855
23 0.1110
24 0.3654
25 0.3244
26 0.0725
27 0.1834
28 0.2728
29 0.1966
30 -0.1193
31 0.0943
32 0.0953
33 0.1327
34 0.1971
35 0.3107
36 -0.0377
37 -0.1835
38 0.1697
39 0.1743
40 0.1737
41 0.1569
42 0.1823
43 0.2072
44 0.2186
45 0.2212
46 -0.1279
47 0.0481
48 0.1516
50 -0.2887
51 0.1026
52 0.1897
53 0.2752
54 0.1666
55 0.2326
56 0.2654
57 0.1478
58 0.0948
59 0.1863
60 0.1851
62 0.0099
63 -0.0384
64 0.1447
65 0.0906
66 0.4637
67 0.1436
68 0.3245
70 0.0789
71 0.1043
72 0.1496
73 0.1299
74 0.2814
75 0.1357
76 0.0203
77 0.0266
78 0.3075
79 0.0557
80 -0.0283
81 0.1439
82 0.2320
83 0.1624
84 0.1394
85 0.2658
86 0.3027
87 0.2093
89 0.1615
91 0.2948
92 0.1351
94 0.3919
95 0.2637
96 0.2045
97 0.1834
98 0.0531
99 0.2252
100 0.0688
101 0.2982
102 0.2642
103 0.2324
104 0.0479
106 0.2642
107 0.2565
108 0.1553
109 0.1604
110 0.1421
111 0.0683
112 0.1792
113 0.0688
114 0.3397
115 0.1724
116 0.1863
117 0.1045
118 0.1327
119 0.1360
120 0.1711
121 0.3371
122 0.1805
123 0.0690
124 0.0807
125 0.0062
127 0.1589
128 0.2574
129 0.3669
130 0.2705
131 0.1421
132 0.2365
133 0.0174
134 0.1324
135 0.2010
136 0.1285
137 0.4718
138 0.0878
139 0.4377
140 0.4718
141 0.1927
142 0.1609
143 0.1576
144 0.2093
145 -0.1464
146 0.0949
147 0.0786
148 0.1115
149 0.3080
150 0.0550
151 0.3051
152 0.2564
153 0.1012
154 -0.0109
155 0.3473
156 0.2256
157 -0.0130
158 0.1062
159 0.0944
161 0.0848
162 0.0250
163 0.2179
164 0.2529
165 -0.0017
166 0.0236
167 -0.1102
168 0.1246
170 0.3092
171 0.1818
172 0.3054
173 0.1748
174 0.1701
175 -0.0759
177 0.3543
178 0.0870
179 0.1854
180 0.2650
181 0.4718
182 0.1239
183 0.2577
184 0.1967
185 0.2603
186 0.0820
187 0.2001
188 0.2065
189 0.2937
190 -0.0125
191 0.3266
192 -0.1102
193 0.4718
194 0.1798
195 0.0349
196 0.2538
197 0.1197
198 0.2380
199 0.2221
200 0.2187
202 0.3245
203 0.0297
204 0.0541
205 0.0102
206 0.1687
207 0.1219
208 0.0794
209 0.3448
210 0.1287
211 0.2435
212 0.2118
214 0.4718
215 -0.0583
216 0.0972
217 0.4309
218 -0.0421
219 -0.0327
220 0.0583
221 0.3380
222 0.0571
223 0.1154
224 0.1302
225 0.1446
226 0.0721
227 0.2580
228 0.2653
229 -0.1265
231 0.1057
232 0.0473
233 0.2217
234 0.0387
235 0.3127
236 -0.0212
237 0.0985
238 0.0834
239 0.1192
240 0.1928
241 0.1662
242 0.1025
243 0.3392
244 0.2716
245 0.2817
246 0.4718
247 0.2898
248 0.0204
249 -0.0402
250 0.0349
251 0.4637
252 0.2105
253 0.3228
254 0.0008
255 -0.0123
256 0.2257
257 -0.0631
258 0.2417
259 0.3245
260 0.1186
261 -0.0321
262 0.0172
263 0.1982
264 0.2243
265 0.3561
266 0.3473
267 0.1490
268 0.3960
270 0.1787
271 0.2054
272 0.0846
273 0.3234
274 0.1581
275 0.3387
276 0.2101
277 0.0988
278 0.2658
279 0.4718
281 0.2924
282 0.3191
283 0.0955
284 0.1472
285 0.2093
286 0.2075
287 0.2656
288 0.3919
289 0.3334
290 0.0908
291 0.3446
292 0.0953
293 0.2215
294 0.2127
295 0.1058
296 0.2033
297 0.2487
298 0.0280
299 -0.0401
300 -0.0272
301 0.1496
302 -0.0622
303 0.1490
304 0.3088
305 0.4718
306 0.1677
307 0.1295
308 0.2082
309 0.0384
310 0.1727
311 0.3919
312 0.2550
315 0.2939
316 0.4046
317 0.1527
318 0.0109
319 0.0507
321 0.1249
322 -0.1102
323 0.2773
324 0.0759
325 0.3230
326 0.2625
327 0.2912
328 0.2217
329 0.3097
330 0.0926
331 0.1464
332 0.1774
333 -0.0124
334 0.1464
335 0.1327
336 0.1732
337 0.1891
338 0.2531
339 0.2663
340 0.1273
341 0.2622
342 0.0909
343 0.2061
345 -0.0327
346 0.0136
347 0.2213
348 0.1327
349 0.1371
350 0.2997
351 0.2042
352 0.2173
353 0.2559
354 0.1909
355 0.4718
356 0.2767
357 0.4718
358 0.2125
359 0.2125
360 0.0577
362 0.1502
364 0.2925
365 0.2550
366 0.3147
367 0.2531
368 0.1609
369 0.2213
370 0.3902
371 0.2550
373 0.1545
375 0.3919
376 0.3221
377 0.0997
378 0.1469
379 0.1875
380 0.1947
381 0.2622
382 0.1571
383 0.1163
384 0.1540
385 0.2256
386 0.0701
387 -0.0374
388 0.1693
389 0.1947
390 0.0436
391 -0.0141
392 0.1696
393 -0.0134
394 0.3541
395 0.3414
396 0.1947
397 0.2814
398 0.1010
399 0.2465
400 0.3145
401 0.2003
402 0.2590
403 0.3471
404 0.1894
405 0.4718
406 0.2427
407 0.3238
408 0.2359
409 0.1233
410 0.1541
411 0.0971
412 0.2252
413 0.1327
414 0.1924
415 0.1496
416 0.3919
417 0.0759
418 0.1567
419 0.3197
420 0.3177
421 -0.0620
422 0.1473
423 0.3919
424 0.1542
425 -0.1102
426 0.2220
427 0.2288
428 0.1774
429 0.0994
431 0.0766
432 0.3245
433 0.1306
434 0.2962
435 0.3236
436 0.3473
437 0.3919
438 0.1165
439 0.3355
440 0.0796
441 -0.0487
442 0.4637
443 0.1760
444 0.1451
445 0.1634
446 0.2935
447 0.3380
448 0.0057
449 0.2563
450 0.1490
453 0.2935
454 0.2082
456 0.1853
457 0.1432
458 0.3511
459 0.3225
460 0.2538
462 0.1962
463 0.1188
464 0.1978
465 0.2188
466 0.1624
467 0.4046
468 0.3473
469 0.2072
471 0.0507
472 0.3630
473 0.0259
475 0.1519
476 0.0361
477 0.2254
478 0.2984
479 0.2658
480 0.2187
481 0.0571
482 0.2213
483 0.1976
484 0.1129
485 0.2417
486 0.1576
487 0.2925
489 0.2826
490 0.1197
491 0.4637
492 -0.0417
493 0.4360
495 0.1892
496 0.1582
497 0.2756
498 0.2817
499 0.2779
500 0.1563
502 0.2327
503 0.2148
504 0.1271
505 0.2768
506 0.0448
507 0.4360
508 0.2747
509 0.2144
510 0.0070
511 0.2210
513 0.3397
514 0.2925
515 0.1712
516 0.2874
517 0.0239
518 0.3240
519 0.3919
520 0.1755
522 0.2299
524 0.3039
526 0.2550
527 0.2452
528 0.3039
529 0.2417
530 0.1883
531 0.1513
533 0.0997
534 0.2284
535 0.3096
536 0.2783
537 0.4718
538 0.1711
539 0.1490
540 0.0252
541 0.2917
542 0.1816
543 0.1321
544 0.2814
545 0.2417
546 0.2937
547 0.3919
548 -0.0060
549 0.2829
550 0.3350
551 0.2017
553 0.1327
554 0.4718
555 0.0450
556 -0.0419
557 0.1523
558 0.2008
559 0.1958
560 0.3668
563 0.2021
564 0.2076
565 0.1659
566 0.4718
567 0.2379
568 0.2220
569 0.1542
570 0.3919
571 0.2093
572 0.2062
573 -0.1835
574 0.0773
575 0.1034
576 0.1741
577 0.3210
578 0.1708
579 0.4637
580 0.3214
581 0.4718
582 0.3902
583 0.1685
585 0.2398
586 0.3919
587 0.2925
588 0.2773
589 0.3919
590 0.0074
591 0.2811
592 -0.1102
593 0.2359
594 0.2265
595 0.1613
596 0.1681
598 0.0203
599 0.0773
601 0.1838
602 0.3919
603 0.2045
604 -0.0814
605 0.1436
606 0.1041
607 -0.0449
608 0.3414
609 0.1381
611 0.1208
612 -0.0051
613 0.3333
614 -0.0384
615 0.1490
616 0.2642
617 0.3339
618 0.4718
619 0.1851
620 0.1831
621 0.2358
622 0.3919
623 0.0749
624 0.0927
625 0.2169
626 0.1490
627 0.1531
628 -0.0998
629 0.2550
630 0.2013
631 0.0341
632 0.2144
633 0.3541
634 0.4718
635 0.0203
637 0.2561
638 -0.0971
639 0.1636
640 0.1472
641 0.4637
642 0.1119
644 0.3785
645 0.0326
646 0.0447
647 0.1455
648 0.3070
649 0.2380
651 0.3040
652 0.2713
653 0.2554
654 0.1609
655 0.2904
656 0.3349
657 0.2979
658 0.2837
659 0.1369
660 0.0464
661 0.2110
662 0.1680
663 0.3323
664 0.3254
665 0.4718
666 0.1489
667 0.0744
668 -0.0998
669 0.0049
670 0.2600
671 0.0137
672 0.2502
673 0.2267
675 0.2393
676 0.2075
677 0.0537
678 0.3416
679 -0.0449
680 0.2021
681 0.1119
682 0.4718
683 0.0203
684 0.0096
685 0.2290
686 0.3243
687 0.0759
688 0.2855
689 0.2377
690 0.2339
691 0.2333
692 0.3020
693 0.3057
694 0.2156
695 0.3646
696 0.1630
697 0.3170
698 0.2517
699 0.3530
700 0.2949
701 0.3919
702 0.2232
703 0.4718
704 0.2109
705 0.4169
706 0.1975
707 0.2673
708 0.0500
709 0.0918
710 0.3219
711 0.3398
712 0.1332
713 0.3199
714 0.2673
715 0.3088
716 0.1782
717 0.2263
718 0.4637
719 0.3769
720 0.1146
721 0.2347
722 0.0613
723 0.2750
724 0.2219
725 0.2537
726 0.1907
727 0.1935
728 0.2226
729 0.0464
730 0.2793
731 0.2544
732 0.2500
733 0.2966
734 0.0238
735 0.3473
736 0.1924
737 0.3375
738 0.2773
739 0.2642
740 0.2187
741 0.2998
742 0.3471
743 0.4718
744 0.2340
745 0.2770
746 0.2630
747 0.2754
748 0.2978
749 0.1618
750 0.2529
751 0.2327
753 0.2550
755 0.1355
756 0.1924
757 0.2283
758 0.2816
759 0.2793
760 0.3165
761 0.3539
762 0.3230
763 0.1845
764 0.2505
766 0.1110
767 0.2465
768 0.0160
769 0.2169
770 0.3286
771 0.2706
772 0.1503
773 0.1510
774 0.1245
775 0.0148
776 0.1446
777 0.2861
778 0.1959
779 0.2965
780 0.4718
781 0.3333
782 0.1478
784 0.3606
785 0.2882
786 0.2800
787 0.2456
789 0.2626
790 0.1355
791 0.2125
792 0.2046
793 0.3043
794 0.3471
795 0.3902
796 0.3919
797 0.2454
798 0.1995
799 0.2315
800 0.3209
801 0.1243
802 0.0203
803 0.3245
804 0.1575
805 -0.0644
806 0.2837
808 0.2924
809 0.1259
810 0.2192
811 0.2225
812 0.2422
813 0.1314
814 0.1609
815 0.1686
816 0.3082
817 0.2305
818 0.3334
819 0.3204
820 0.1961
821 0.3234
822 0.3749
823 0.2006
824 0.2372
825 0.1571
826 0.2124
827 0.3236
828 0.1892
829 0.0511
830 0.0612
831 0.1716
832 0.1529
833 0.3902
834 0.0131
835 0.1793
836 0.3333
837 0.1887
838 0.1394
839 0.1360
840 0.2417
841 -0.0384
842 0.3808
843 0.1535
844 0.3420
845 0.2158
846 0.2579
847 0.1490
849 0.3067
850 0.3386
851 0.2595
852 0.3189
853 0.2694
854 0.3375
855 0.3006
856 0.3917
857 0.2166
858 0.1405
859 0.3902
862 0.2097
863 0.3333
865 0.2462
866 0.1729
Respondent 30: Press ENTER.
Respondent 37: Press ENTER.
Respondent 46: Press ENTER.
Respondent 35: Press ENTER.
[1] "done"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.