Skip to content

ModelCustom's S3 predict method is not working #87

@asiripanich

Description

@asiripanich

ModelBinaryChoice, ModelMultinomialLogit, ModelLinear still need a little more work.

  • If the LHS of the formula is missing from newdata then the predict method won't work. This can be fixed by omitting the LHS variable in model.matrix which is possible with the Formula package.
form <- Formula::Formula(sex ~ age + marital_status)
mm <- model.matrix(form, toy_individuals, lhs = 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions