Skip to content

Ignore some categories for imputation #640

Closed Answered by stefvanbuuren
MuzzJ asked this question in Q&A
Discussion options

You must be logged in to vote

I have a dataset where one nominal variable has 4 values, all have some presence in the dataset. Some data were lost, but it is known that the missing values can be two of the four categories.

I suggest you try the exclude argument from mice.impute.pmm(). It specifies a vector of dependent values to exclude from the imputation model and the collection of donor values. Excluding the two impossible categories would then always impute one of the other two.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MuzzJ
Comment options

Answer selected by MuzzJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants