Skip to content

Replace aliasing in Feols methods #853

Open
0 of 4 issues completed
Open
0 of 4 issues completed
@s3alfisc

Description

@s3alfisc

In almost all methods of Feols, attributes are accessed via aliases. This leads to more lines of code than required, at no gain in readability.

Example: for the _vcov_iid method, we currently have

def _vcov_iid(self):
    N = self._N
    u_hat = self._u_hat
    bread = self._bread
    sigma2 = np.sum(u_hat.flatten() ** 2) / (N - 1)
    vcov = bread * sigma2

    return vcov

but we want

def _vcov_iid(self):
    sigma2 = np.sum(self._u_hat.flatten() ** 2) / (self._N - 1)
    return self._bread * sigma

This applies to practically all the methods of Feols:

  • _set_nobs()
  • get_fit()
  • vcov()
  • _vcov_iid
  • _vcov_hetero
  • _vcov_crv1
  • _vcov_crv3_fast
  • _vcov_crv3_slow
  • get_inference
  • wald_test
  • wildboottest
  • fixef
  • get_performance
  • ritest

Sub-issues

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