-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Based on discussions in #1042 (comment), we noticed that FixedEffectsModels.jl uses a different multicollinearity check than fixest(which we follow in pyfixest).
Instead of computing a cholesky decomposition after demeaning, they simply compare the "residual variance" of X_demeaned with the "initial variance" of X.
We would like to add the residual variance check as an optional check. See here for the implementation: link
API
We will do so by introducing a new argument to feols, fepois, feglm, quantreg which we might just name collin_tol2.
If it is None, we do not apply the additional check - otherwise we do.
Note: not sure if this is the best option? Maybe introduce collin_kwargs as a new argument in a non-API breaking way and announce that we will deprecate collin_tol if users provide a value?
Math
Let
We then compute the ratio of residual to original sum of squares:
We flag a variable as multi collinear if
rho_i less than collin_tol2.
Comparison:
Note that the FixedEffectsModels.jl method only checks for multicollinearity of X with the fixed effects, while cholesky also checks across the covariates in X.