mice icon indicating copy to clipboard operation
mice copied to clipboard

Default behavior of `make.predictorMatrix()` outputs `1`s for complete variables

Open hanneoberman opened this issue 7 months ago • 2 comments

The behavior is inconsequential, but might confuse users. I would suggest adding an argument that takes care of this (or change the behaviour altogether, but I don't think that's necessary)

library(mice)
make.predictorMatrix(nhanes)
#>     age bmi hyp chl
#> age   0   1   1   1
#> bmi   1   0   1   1
#> hyp   1   1   0   1
#> chl   1   1   1   0
quickpred(nhanes)
#>     age bmi hyp chl
#> age   0   0   0   0
#> bmi   1   0   1   1
#> hyp   1   0   0   1
#> chl   1   1   1   0

Created on 2023-11-21 with reprex v2.0.2

hanneoberman avatar Nov 21 '23 16:11 hanneoberman