Skip to content

computeForestLeafIndices() doesn't check for propensity covariates in bcf models #168

@jaredsmurray

Description

@jaredsmurray

computeForestLeafIndices() takes a covariate matrix, but not a propensity score and doesn't check model_params to see if the prop score was used as a covariate like predict.bcfmodel does. The return value has the expected dimensions and plausible content but is off in small, upredictable ways when the propensity score was used as a covariate (presumably because the function walking the tree is going out of the bounds of the supplied covariate matrix when the tree splits on the prop score). Manually appending the propensity score or omitting it as a covariate corrects the issue. The fix is probably to borrow the logic and preprocessing in predict.bcfmodel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions