Skip to content

Let DummyCoding() specify a subset (or superset!) of levels #308

@droodman

Description

@droodman

Stata lets you economically state models with a subset of possible dummies for a given categorical variable:

regress y i(1 3).x

That regresses y on two dummies, one for x==1, one for x==3.
It would be nice for the levels option of DummyCoding() to allow the same.

One can also do

regress y ibn.x, nocons

Which specifies a complete dummy set and no constant term. ("bn" means "base, none") DummyCoding() could accept base=:none to do the same.

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