Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error "t.haven_labelled() not supported" is related to the haven package, not the mice package. The haven package is used to read and write data in various formats, including those created by SAS, SPSS, and Stata.

The error occurs when the mice package encounters variables that are labelled with the haven_labelled class in your dataset. The mice package does not support variables with this class, and therefore, it cannot impute missing values in these variables.

To resolve the error, you can try converting the variables with haven_labelled class to a different class, such as factor or character. You can do this using the as_factor() or as.character() functions from the haven package.

Alternatively, you can remove the labels from the variables using the zap_labels() function from the haven package. However, this will remove the labels from all variables in your dataset.