amices / mice

Multivariate Imputation by Chained Equations
https://amices.org/mice/
GNU General Public License v2.0
433 stars 107 forks source link

Ip heckman 2nd trial #500

Closed johamunoz closed 1 year ago

hanneoberman commented 1 year ago

This is a second attempt to include the IPD Heckman imputation function (see #485)

hanneoberman commented 1 year ago

Check whether conditional import can be used?

stefvanbuuren commented 1 year ago

Johanna and Hanna, thanks for your contributions.

The PR is technically correct, but I hesitate to merge this version into master. The problem is that it would add many new dependencies to mice. To check the package, I needed to install 24 additional packages into my already sizeable library. Some of these dependencies are pretty large, e.g. VGAM or copula. Merging these into master would substantially increase checking time and complicate maintenance.

I see two possible routes to progress:

  1. Rewrite the code of mice.impute.2l.heckman() so that it uses libraries already available to mice;
  2. Create a separate package with specialised mice.impute.xxx() functions.

Option 1. might require substantial double work. Feel free to reopen if your choose route 1. I suggest opting for possibility 2. There are several packages, e.g. miceadds and micemd, that offer additional functions on top of mice. You could follow a similar path and exert direct control over your contributions.

Trust you understand my concerns.

johamunoz commented 1 year ago

Thank you very much to you! We understand the situation, and the implications of installing and monitoring an imputation method with so many dependencies. We will consider the options you raised. Thank you again, Johanna