Hello,
I was trying to leverage ATTgt().fit() and was consistenly getting a the following message. Res_num was supposed to be a covariate to be used in the xformla
Warning: Formula processing failed: Error evaluating factor: NameError: name 'res_num' is not defined
~1 + res_nu
After debugging the code I found the error. In pre_process_did, it was unable to go through either of the following:
try:
_, x_cov = fml(xformla, data=data, return_type='dataframe')
except Exception:
x_cov = patsy.dmatrix(xformla, data=data, return_type='dataframe')
The problem was that column in the data provided to ATTgt was not int64 or float64, but was in object type.
Potentially inserting a error message more directed to a data type error could be useful for future users.
Thank you for the great work!! This has been super helpful
best
João Franco
Hello,
I was trying to leverage ATTgt().fit() and was consistenly getting a the following message. Res_num was supposed to be a covariate to be used in the xformla
After debugging the code I found the error. In pre_process_did, it was unable to go through either of the following:
The problem was that column in the data provided to ATTgt was not int64 or float64, but was in object type.
Potentially inserting a error message more directed to a data type error could be useful for future users.
Thank you for the great work!! This has been super helpful
best
João Franco