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

Monotone data imputation requires changing the predictor matrix #316

Closed
stefvanbuuren opened this issue Mar 11, 2021 · 1 comment
Closed

Comments

@stefvanbuuren
Copy link
Member

Jonathan Bartlett alerted me to an error in the example in https://stefvanbuuren.name/fimd/sec-monotone.html. One-step convergence in monotone data imputation requires three changes to the default arguments in mice:

  1. Set visitSequence = "monotone"
  2. Set maxit = 1
  3. Remove later variables from the predictorMatrix.

The sample code in the book specifies 1 and 2, but not 3. If we do not do 3, then convergence within 1 iteration is not guaranteed.

Probably most convenient fix is to let mice automatically change the predictor matrix if the user specifies visitSequence = "monotone".

@stefvanbuuren stefvanbuuren changed the title Monotone data imputation should also change the predictor matrix Monotone data imputation requires changing the predictor matrix Mar 11, 2021
@stefvanbuuren
Copy link
Member Author

Commit 8f78a27 adds a function edit.predictorMatrix() that changes predictorMatrix to a monotone pattern if visitSequence = "monotone" and if maxit = 1.

Adds to documentation:
Special case: If you specify both visitSequence = "monotone" and maxit = 1, then the procedure will edit the predictorMatrix to conform to the monotone pattern. Realize that convergence in one iteration is only guaranteed if the missing data pattern is actually monotone. The procedure does not check this.

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

1 participant