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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-11-22 11:00:00 +0000
Seen: 18 times
Last updated: May 15 '22
What is the best way to arrange the file structure for both the backend and frontend in MERN?
Is it possible to utilize a SAS Server for storing network files? If so, what is the process?
What is a data storage solution for backing up data?
What does the error message "gulp-sass plugin error" indicate when deploying a theme on Liferay 7.4?
How can ADOMD.NET be used to deploy UDFs (User defined functions) to SSAS?
What is the process for importing a SAS table using proc import?