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.
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 99)
df: deprecated. Use argument Data instead.
Returns
A data.frame object.
Examples
HCImissed <- HCI[,1:20]# simulate skipped (missed) and not-reached items in HCI datasetset.seed(4211)for(i in1: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)
See Also
ItemAnalysis()
Author(s)
Jan Netik
Institute of Computer Science of the Czech Academy of Sciences