Skip to content

Allow users to Use Sparse Solver #726

Open
@s3alfisc

Description

@s3alfisc

Sometimes, we might want to fit a model with fixed effects, but without projecting them out. I.e. a model as

pf.feols("Y ~ C(f1) + C(f2)", data = data)

In this case, it would be nice if users could use the sparse solver in scipy.sparse.linalg.lsqr.

We would have to add this option to the "solver" function argument of pf.feols()

solver: SolverOptions = "np.linalg.solve",

and propagate this to

def solve_ols(self, tZX: np.ndarray, tZY: np.ndarray, solver: str):

Note that this will only speed up the model fit, but not necessarily the computation of standard errors (which are not so easily adapted to a sparse solver).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions