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

Diagnostic plots for logical values #155

Closed
lillemets opened this issue Nov 21, 2018 · 1 comment
Closed

Diagnostic plots for logical values #155

lillemets opened this issue Nov 21, 2018 · 1 comment

Comments

@lillemets
Copy link

lillemets commented Nov 21, 2018

I'm unable to create plots for class mids objects using densityplot, stripplot or bwplot because the mids object contains imputed logical values.

Error in bind_rows_(x, .id) : 
  Column `variablename` can't be converted from logical to numeric

Is this expected behavior? Is there a solution?

@stefvanbuuren
Copy link
Member

These lattice functions are for numeric outcomes. One way to circumvent the error is to manually convert logical by as.numeric before imputation, and use the default imputation method (pmm) for these variables. However, the resulting plots might not make much sense since there are only two different values.

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

No branches or pull requests

2 participants