Currently, the fixed effects demeaning takes place outside of Feols and Fepois.
With this PR, we move the fixed effects demeaning "into" Feols / Fepois. Note that this is already the case for Fepois.
Dropping of fixed effects singletons will also be moved into Feols.
Therefore, we need to add the following function arguments to Feols / Fepois:
fval_mat, which is the matrix containing the fixed effects. If not yet of type integer, needs to be converted to int's - else the demean will complain.
fixef_rm, which controls if singleton fixed effects are dropped or not. This currently happens in model_matrix_fixest and therefore requires cleaning up.
fixef_tol, the tolerance of the fixed effects demeaning algo (by default 1e-08)
Note that for IV, we need to demean both the design matrix X (including the exog + endog variables) and Z (including exog vars + instruments).
Currently, the fixed effects demeaning takes place outside of
Feols
andFepois
.With this PR, we move the fixed effects demeaning "into"
Feols
/Fepois
. Note that this is already the case forFepois
.Dropping of fixed effects singletons will also be moved into
Feols
.Therefore, we need to add the following function arguments to
Feols
/Fepois
:fval_mat
, which is the matrix containing the fixed effects. If not yet of type integer, needs to be converted to int's - else thedemean
will complain.fixef_rm
, which controls if singleton fixed effects are dropped or not. This currently happens inmodel_matrix_fixest
and therefore requires cleaning up.fixef_tol
, the tolerance of the fixed effects demeaning algo (by default 1e-08)Note that for IV, we need to demean both the design matrix X (including the exog + endog variables) and Z (including exog vars + instruments).