Hanne Oberman
Hanne Oberman
Hi @rjverheijden, sorry for the late response. Thank you very much for your contribution. I'm not adding your function in the current form to the `ggmice` package. I will be...
Alternative: add optional argument to plot_corr etc. to use `model.matrix` instead of variables.
Maybe check if jitter can be applied either horizontally or vertically, depending on the missingness? E.g. `geom_jitter(width = 0)`
Alternative: `VIM::marginplot()`-like functionality
The current version does not have this issue ``` r library(ggmice) library(ggplot2) ggmice(mice::nhanes, aes(age, bmi)) + geom_jitter() ```  Created on 2023-06-27 with [reprex v2.0.2](https://reprex.tidyverse.org)
Link update: https://solomonkurz.netlify.app/blog/2021-10-21-if-you-fit-a-model-with-multiply-imputed-data-you-can-still-plot-the-line/
Work in progress: ``` r # load packages # devtools::load_all() library(ggmice) library(ggplot2) library(mice) library(dplyr) # load some data dat ``` r # impute the incomplete data imp ``` r #...
Just the code: ``` # load packages # devtools::load_all() library(ggmice) library(ggplot2) library(mice) library(dplyr) # load some data dat
There 2 options: - data -> transform with mutate -> ggmice - data -> ggmice -> scale_*_log
``` r library(ggmice) ggmice(mice::nhanes, ggplot2::aes(x = age, y = log(bmi))) + ggplot2::geom_point() #> Warning in log(bmi): NaNs produced #> Warning in log(bmi): NaNs produced #> Warning: Removed 9 rows containing...