ggmice
ggmice copied to clipboard
Add `facets` or `purrr::map()` to old friends to plot all variables
This is still an advantage of mice::stripplot(imp)
over the ggmice
solution
e.g. in vignettes/ggmice.Rmd
on line 163
add facet example using patchwork
for each example.
Fixed in #101
Think about adding a wrapper function for the old friends...
library(ggmice)
imp <- mice::mice(mice::nhanes, print = FALSE)
purrr::map(names(imp$data), ~{
# ggmice equivalent
ggmice(imp, ggplot2::aes(x = .imp, y = .data[[.x]])) +
ggplot2::geom_jitter(height = 0, width = 0.25) +
ggplot2::labs(x = "Imputation number")
}) %>% setNames(names(imp$data))
#> $age
#>
#> $bmi
#>
#> $hyp
#>
#> $chl
Created on 2023-11-07 with reprex v2.0.2