Skip to content

Cannot run TWFE example #10

@amichuda

Description

@amichuda

I'm running differences 0.1.2,

Running the TWFE example from the README doesn't work:

from differences import TWFE, simulate_data

df = simulate_data()

twfe = TWFE(data=df, cohort_name='cohort')

twfe.fit(formula='y')

It errors with:

ValueError: Only numeric, string  or categorical data permitted

Upon debugging, I found that the issue happens when the data is fed into linearmodels.AbsorbingLS and self._y is cast to an object type because it has numbers as well as booleans.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions