def setup_class(cls): """Stata reg output from `sysuse auto; reg price mpg`""" test_path = path.split(path.relpath(__file__))[0] auto_path = path.join(test_path, 'data', 'auto.dta') autodata = pd.read_stata(auto_path) y = 'price' x = ['mpg', 'length'] z = ['trunk', 'weight'] w = [] cls.result = ivreg(autodata, y, x, z, w, addcons=True) cls.expected = tsls_std
def setup_class(cls): """Stata reg output from `sysuse auto; reg price mpg`""" test_path = path.split(path.relpath(__file__))[0] auto_path = path.join(test_path, 'data', 'auto.dta') autodata = pd.read_stata(auto_path) y = 'price' x_end = ['mpg', 'length'] z = ['trunk', 'weight'] x_exog = [] a = 'gear_ratio' cls.result = ivreg(autodata, y, x_end, z, x_exog, a_name=a) cls.expected = atsls_std
def setup_class(cls): """Stata reg output from `sysuse auto; reg price mpg`""" cls.init(cls) test_path = path.split(path.relpath(__file__))[0] auto_path = path.join(test_path, 'data', 'auto.dta') autodata = pd.read_stata(auto_path) y = 'price' x_end = ['mpg', 'length'] z = ['trunk', 'weight', 'headroom'] x_exog = [] nosingles = True cls.result = ivreg(autodata, y, x_end, z, x_exog, addcons=True, iv_method='liml', nosingles=nosingles) cls.expected = liml_std
def setup_class(cls): """Stata reg output from `sysuse auto; reg price mpg`""" cls.init(cls) test_path = path.split(path.relpath(__file__))[0] auto_path = path.join(test_path, 'data', 'auto.dta') autodata = pd.read_stata(auto_path) y = 'price' x_end = ['mpg', 'length'] z = ['trunk', 'weight'] x_exog = [] cls.result = ivreg(autodata, y, x_end, z, x_exog, vce_type='hc1', addcons=True) cls.expected = tsls_robust