
Calculates item nearest neighbor imputation approach discussed by Yeh et al. (2023)
Source:R/mcq.R
inn.RdCalculates item nearest neighbor imputation approach discussed by Yeh et al. (2023)
Arguments
- dat
A single subject's MCQ data in long form
- reg
Registry list from
.instrument_registry()/.mcq_registry()- random
Boolean whether to insert a random draw (0 or 1) for NAs whose neighbours disagree or are all missing. When the observed neighbours agree (e.g. responses
1, NA, NAwithin a rank group) the NAs take that value even withrandom = TRUE, following Yeh et al. (2023). Items that stay missing are reported with a warning.- verbose
Boolean whether to print subject and question ids pertaining to missing data