Skip to content

Bug: predict() method fails with new data and pyfixest special syntax - i(), C(), var1^var2 operators #684

@s3alfisc

Description

@s3alfisc

Examples:

%load_ext autoreload
%autoreload 2 

import pyfixest as pf 
data = pf.get_data()

#fit = pf.feols("Y ~ i(X1) | f1", data = data)
#fit.predict(newdata = data.iloc[0:100])
#FactorEvaluationError: Unable to evaluate factor `i(X1)`. [NameError: name 'i' is not defined]

fit = pf.feols("Y ~ X1 | f1^f2", data = data)
fit.predict(newdata = data.iloc[0:100])
# KeyError: "None of [Index(['f1^f2'], dtype='object')] are in the [columns]"

Metadata

Metadata

Assignees

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