Skip to content

Commit

Permalink
Merge pull request #22 from knaaptime/1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrovma authored Sep 21, 2024
2 parents 47d42b6 + 9bcd425 commit 2d76cb8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions spreg/diagnostics_sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def __init__(self, ols, w, z=False):


class AKtest:
"""
r"""
Moran's I test of spatial autocorrelation for IV estimation.
Implemented following the original reference :cite:`Anselin1997`
Expand Down Expand Up @@ -441,7 +441,7 @@ def __init__(self, iv, w, case="nosp"):


class spDcache:
"""
r"""
Helper class to compute reusable pieces in the spatial diagnostics module
...
Expand Down Expand Up @@ -919,7 +919,7 @@ def get_zI(I, ei, vi):


def akTest(iv, w, spDcache):
"""
r"""
Computes AK-test for the general case (end. reg. + sp. lag)
Parameters
Expand Down
2 changes: 1 addition & 1 deletion spreg/error_sp_het.py
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,7 @@ def get_psi_sigma(w, u, lamb):


def get_vc_het(w, wA1, E):
"""
r"""
Computes the VC matrix Psi based on lambda as in Arraiz et al :cite:`Arraiz2010`:
..math::
Expand Down
2 changes: 1 addition & 1 deletion spreg/error_sp_hom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ def moments_hom(w, wA1, wA2, u):


def get_vc_hom(w, wA1, wA2, reg, lambdapar, z_s=None, for_omegaOLS=False):
"""
r"""
VC matrix \psi of Spatial error with homoscedasticity. As in
Anselin (2011) :cite:`Anselin2011` (p. 20)
...
Expand Down
2 changes: 1 addition & 1 deletion spreg/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def out_part_middle(strSummary, reg, robust, m=None, latex=False):
df_2 = df_2.set_axis(['Variable', 'Coefficient', 'Std.Error', _reg.__summary['summary_zt']+'-Statistic', 'Prob.'], axis='columns', copy=False)
cols = df_2.columns.difference(['Variable'])

Check warning on line 136 in spreg/output.py

View check run for this annotation

Codecov / codecov/patch

spreg/output.py#L133-L136

Added lines #L133 - L136 were not covered by tests
df_2[cols] = df_2[cols].astype(float).map(lambda x: "%12.5f" % x)
df_2['Variable'] = df_2['Variable'].str.replace("_", "\_").str.replace("%", "\%")
df_2['Variable'] = df_2['Variable'].str.replace("_", r"\_").str.replace("%", r"\%")
df_inlatex = df_2.style.hide(axis='index').to_latex(hrules=True)

Check warning on line 139 in spreg/output.py

View check run for this annotation

Codecov / codecov/patch

spreg/output.py#L138-L139

Added lines #L138 - L139 were not covered by tests
strSummary += df_inlatex
strSummary += "------------------------------------------------------------------------------------\n"
Expand Down
6 changes: 3 additions & 3 deletions spreg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def get_A1_het(S):


def get_A1_hom(s, scalarKP=False):
"""
r"""
Builds A1 for the spatial error GM estimation with homoscedasticity as in
Drukker et al. [Drukker2011]_ (p. 9).
Expand Down Expand Up @@ -260,7 +260,7 @@ def get_A1_hom(s, scalarKP=False):


def get_A2_hom(s):
"""
r"""
Builds A2 for the spatial error GM estimation with homoscedasticity as in
Anselin (2011) :cite:`Anselin2011`
Expand Down Expand Up @@ -632,7 +632,7 @@ def inverse_prod(
def power_expansion(
w, data, scalar, post_multiply=False, threshold=0.0000000001, max_iterations=None
):
"""
r"""
Compute the inverse of a matrix using the power expansion (Leontief
expansion). General form is:
Expand Down

0 comments on commit 2d76cb8

Please sign in to comment.