# NOT RUN {
library(magrittr)
airquality %>% add_prop_miss()
# this can be applied to model the proportion of missing data
# as in Tierney et al bmjopen.bmj.com/content/5/6/e007450.full
library(rpart)
library(rpart.plot)
airquality %>%
add_prop_miss() %>%
rpart(prop_miss ~ ., data = .) %>%
prp(type = 4,
extra = 101,
prefix = "prop_miss = ")
# }
Run the code above in your browser using DataLab