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

Mice nnet #666

Merged
merged 13 commits into from
Nov 2, 2020
Merged

Mice nnet #666

merged 13 commits into from
Nov 2, 2020

Conversation

ddsjoberg
Copy link
Owner

@ddsjoberg ddsjoberg commented Oct 5, 2020

What changes are proposed in this pull request?
mice and nnet mutlinomial models can now be used in tbl_regression().

  • PR implements a tidy method for mice (mira) objects. the tidy method performs the mice::pool() portion AND the mice::tidy() part. The reason for this is that the pooling function removes the model objects, and returns a tibble of the summarized model. We can access one of the underlying models build on one of the imputed sets so we can extract the variable names, contrasts, etc.
  • PR includes a tbl_regression method for nnet multinomial models. The underlying dataset is one line per level of the outcome per term in the model. This is not the typical structure. I added a note indicating the other tbl_regression functions may yield unexpected results.

If there is an GitHub issue associated with this pull request, please provide link.
closes #645


Checklist for PR reviewer

  • PR branch has pulled the most recent updates from master branch. Ensure the pull request branch and your local version match and both have the latest updates from the master branch.
  • If an update was made to tbl_summary(), was the same change implemented for tbl_svysummary()?
  • If a new function was added, function included in _pkgdown.yml
  • If a bug was fixed, a unit test was added for the bug check
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features. Review coverage with covr::report(). Before you run, set Sys.setenv(NOT_CRAN=true) and begin in a fresh R session without any packages loaded.
  • R CMD Check runs without errors, warnings, and notes
  • NEWS.md has been updated with the changes from this pull request under the heading "# gtsummary (development version)". If there is an issue associated with the pull request, reference it in parantheses at the end update (see NEWS.md for examples).
  • usethis::use_spell_check() runs with no spelling errors in documentation
  • When the branch is ready to be merged into master, increment the version number using usethis::use_version(which = "dev"), run codemetar::write_codemeta(), approve, and merge the PR.

@ddsjoberg ddsjoberg marked this pull request as ready for review October 8, 2020 03:57
@ddsjoberg
Copy link
Owner Author

@karissawhiting @michaelcurry1123 this one is also available, if you'd like 🍁

@michaelcurry1123
Copy link
Contributor

@ddsjoberg I am up for it

@ddsjoberg
Copy link
Owner Author

@ddsjoberg I am up for it

Thanks @michaelcurry1123 ! Would you be able to start with #685 ?

@michaelcurry1123
Copy link
Contributor

@ddsjoberg never been more up for it!

@ddsjoberg
Copy link
Owner Author

@michaelcurry1123 haha yay!

@ddsjoberg ddsjoberg merged commit 13b10dc into master Nov 2, 2020
@ddsjoberg ddsjoberg deleted the mice_nnet branch November 2, 2020 02:55
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

Successfully merging this pull request may close these issues.

Add tbl_regression() for 'mice' and 'nnet::multinom' models
3 participants