Lab exercise 11

Please upload the .pdf file on Moodle by 23:59.

Another dataset included in the careless package is careless_dataset. It is a response data from 200 examinees on 50 items. There are 10 subscales of 5 items. Answer the questions using careless_dataset.

dim(careless_dataset)
## [1] 200  50
names(careless_dataset)
##  [1] "scaleA1" "scaleA2"
##  [3] "scaleA3" "scaleA4"
##  [5] "scaleA5" "scaleB1"
##  [7] "scaleB2" "scaleB3"
##  [9] "scaleB4" "scaleB5"
## [11] "scaleC1" "scaleC2"
## [13] "scaleC3" "scaleC4"
## [15] "scaleC5" "scaleD1"
## [17] "scaleD2" "scaleD3"
## [19] "scaleD4" "scaleD5"
## [21] "scaleE1" "scaleE2"
## [23] "scaleE3" "scaleE4"
## [25] "scaleE5" "scaleF1"
## [27] "scaleF2" "scaleF3"
## [29] "scaleF4" "scaleF5"
## [31] "scaleG1" "scaleG2"
## [33] "scaleG3" "scaleG4"
## [35] "scaleG5" "scaleH1"
## [37] "scaleH2" "scaleH3"
## [39] "scaleH4" "scaleH5"
## [41] "scaleI1" "scaleI2"
## [43] "scaleI3" "scaleI4"
## [45] "scaleI5" "scaleJ1"
## [47] "scaleJ2" "scaleJ3"
## [49] "scaleJ4" "scaleJ5"
  1. Flag those examinees whose length of the longest consecutive string (MaxLongString) of the same responses is greater than or equal to 10. How many examinees are flagged?

hint: longstring() function

  1. Obtain the psychometric synonym indices by calculating the within-examinee correlation over the item pairs with correlation greater than or equal to .6. Draw a histogram of the psychometric synonym indices.

hint: psychsyn() function

  1. Obtain the even-odd consistency indices. Then flag those examinees with even-odd consistency index \(\leq 0\) as potential IERs. What is the number of flagged examinees?

hints:

  • evenodd() function

  • The result may include NAs. To calculate the sum of a vector x containing NAs, run sum(x, na.rm=T).

  1. Calculate the squared Mahalanobis Distance and flag those examinees with the squared distance \(\geq \chi^2_{\alpha=.01, df=n.items}\). How many examinees are flagged?