# NOT RUN {
# goal: fit the extended nominal response model using only persons
# without any missing responses
library(dplyr)
# the following would not work since it will omit only the missing
# responses, not the persons; which is not what we want in this case
wrong = fit_enorm(db, response != 'NA')
# to select on an aggregate level, we need to gather the data and
# manipulate it ourselves
data = get_responses(db,
columns=c('person_id','item_id','item_score','response')) %>%
group_by(person_id) %>%
mutate(any_missing = any(response=='NA')) %>%
filter(!any_missing)
correct = fit_enorm(data)
# }
Run the code above in your browser using DataLab