Compute the coefficients of (swept out) fixed effects for a regression model.
This method creates the following attributes: - _alpha (pd.DataFrame): A DataFrame with the estimated fixed effects. - _sumFE (np.array): An array with the sum of fixed effects for each observation (i = 1, …, N).
Parameters
Name
Type
Description
Default
atol
Float
Stopping tolerance for scipy.sparse.linalg.lsqr(). See https://docs.scipy.org/doc/ scipy/reference/generated/scipy.sparse.linalg.lsqr.html
1e-6
btol
Float
Another stopping tolerance for scipy.sparse.linalg.lsqr(). See https://docs.scipy.org/doc/ scipy/reference/generated/scipy.sparse.linalg.lsqr.html
1e-6
Returns
Name
Type
Description
pd.DataFrame
A tidy DataFrame with columns variable, code, level, and coefficient containing the estimated fixed effects.