简体   繁体   中英

How to use both categorical and continuous predictors in a multiple imputation [r]

I have a large dataset of a couple of categorical (nominal) variables and a number of continuous variables. Most of the continuous variables have missing data.

I have been using the mice package (pmm and rf) to impute the missing data, however, I realised that the method is ignoring the categorical data. The categorical data could be useful for prediction.

Therefore, I am looking for a multiple imputation code (ideally Random Forest because there is a large share of missing data) in R which allows considers both continuous and categorical predictors to impute multiple continuous variables.

事实证明我需要将我的分类变量转换为向量

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM