Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating example in test_sur.py #141

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions spreg/tests/test_sur.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest
import numpy as np
from ..sur_utils import sur_dictxy, sur_dictZ
from ..sur import SUR, ThreeSLS
from spreg.sur_utils import sur_dictxy, sur_dictZ
from spreg.sur import SUR, ThreeSLS
import libpysal
from libpysal.examples import load_example
import geopandas as gpd
from libpysal.common import RTOL


Expand All @@ -14,10 +14,10 @@ def dict_compare(actual, desired, rtol, atol=1e-7):

class Test_SUR(unittest.TestCase):
def setUp(self):
nat = load_example("Natregimes")
self.db = libpysal.io.open(nat.get_path("natregimes.dbf"), "r")
self.w = libpysal.weights.Queen.from_shapefile(nat.get_path("natregimes.shp"))
self.w.transform = "r"
nat = libpysal.examples.load_example('NCOVR')
self.db = gpd.read_file(nat.get_path("NAT.shp"))
self.w = libpysal.weights.Queen.from_dataframe(self.db)
self.w.transform = 'r'

def test_SUR(self): # 2 equations, same K in each, two-step estimation
y_var0 = ["HR80", "HR90"]
Expand Down
Loading