Simple restrictions/constraint for multiple imputation (MICE) in R

∥☆過路亽.° 提交于 2019-12-12 03:27:38

问题


I want to perform multiple imputation for a set of variables using the MICE package in R.

# Example data
data <- data.frame(
    gcs = c(3, 10, NA, NA, NA, 15, 14, 15, 15, 14, 15, NA, 13, 15, 15),
    hf = c(50, 66, 78, 99, NA, NA, 56, 55, NA, 76, 98, 105, NA, NA, 65),
    ...
)

The minimum for gcs is 3 and the maximum is 15, and it may not be a fractional number, how can I set these constraints in MICE? Same goes for hf, but this one only has a bottom limit of 0.

来源:https://stackoverflow.com/questions/36811650/simple-restrictions-constraint-for-multiple-imputation-mice-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!