recode_nr {ShinyItemAnalysis} | R Documentation |
Recognize and recode not-reached responses
Description
recode_nr()
function recognizes and recodes not-reached
responses, i.e., missing responses to items such that all subsequent
items are missed as well by the respondent.
Usage
recode_nr(Data, nr_code = 99, df)
Arguments
Data |
matrix or data.frame: object to be recoded, must include only items columns and no additional information |
nr_code |
single character, integer or numeric: specifying how should be
recognized not-reached responses coded (default is |
df |
deprecated. Use argument |
Value
A data.frame
object.
Author(s)
Jan Netik
Institute of Computer Science of the Czech Academy of Sciences
netik@cs.cas.cz
Patricia Martinkova
Institute of Computer Science of the Czech Academy of Sciences
martinkova@cs.cas.cz
See Also
Examples
HCImissed <- HCI[, 1:20]
# simulate skipped (missed) and not-reached items in HCI dataset
set.seed(4211)
for (i in 1:150) {
# not-reached (minimum at 10th item, maximum at 20th)
HCImissed[sample(1:nrow(HCImissed), 1), seq(sample(10:20, 1), 20)] <- NA
# missed with random location
HCImissed[sample(1:nrow(HCImissed), 1), sample(1:20, 1)] <- NA
}
summary(HCImissed)
HCImissedNR <- recode_nr(HCImissed, nr_code = 99)
head(HCImissedNR)
summary(HCImissedNR)
[Package ShinyItemAnalysis version 1.5.1 Index]