Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plotting functionality (inside ggmice() or as separate function) for conditional distribution based on missingness indicator #10

Closed
hanneoberman opened this issue Mar 3, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@hanneoberman
Copy link
Member

Start from here?

# ggplot2::ggplot(dat, ggplot2::aes(y = age, group = is.na(bmi))) +
#   ggplot2::geom_boxplot() 
# ggmice(dat, ggplot2::aes(y = age)) +
#   ggplot2::geom_boxplot() 
@hanneoberman hanneoberman added the enhancement New feature or request label Mar 3, 2022
@hanneoberman hanneoberman self-assigned this Mar 3, 2022
@hanneoberman
Copy link
Member Author

Add these examples to vignette:

# continuous variable
ggmice(mice::boys, aes(age)) +
        geom_density() + 
        facet_wrap(~factor(is.na(bmi) == 0, labels = c("bmi observed", "bmi missing")))
# categorical variable
ggmice(mice::boys, aes(reg)) +
    geom_bar(fill = "white") + 
    facet_wrap(~factor(is.na(bmi) == 0, labels = c("bmi observed", "bmi missing")))

hanneoberman added a commit to hanneoberman/ggmice that referenced this issue Mar 10, 2022
…ness indicators (examples in amices#10 to be added to vignette)
@hanneoberman
Copy link
Member Author

Fixed in #26

@hanneoberman
Copy link
Member Author

Maybe just use labeller = label_both as default instead of creating a factor in vignette

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant