Skip to content

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

Open
@hanneoberman

Description

@hanneoberman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions