Simple restrictions/constraint for multiple imputa

2019-09-04 07:57发布

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.

0条回答
登录 后发表回答