Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def run_2sls(dependent_var, endogenous_vars, instruments, exogenous_vars):
|
|
69 |
results = f"2SLS regression results:\n{second_stage.summary()}\n\n"
|
70 |
results += f"Hausman test \nNull hypothesis: OLS estimates are consistent\nChi-square(1) = {hausman_stat:.5f}, p-value = {hausman_p_value:.5f}\n"
|
71 |
results += weak_instrument_results + "\n"
|
72 |
-
results += f"
|
73 |
|
74 |
return results
|
75 |
|
|
|
69 |
results = f"2SLS regression results:\n{second_stage.summary()}\n\n"
|
70 |
results += f"Hausman test \nNull hypothesis: OLS estimates are consistent\nChi-square(1) = {hausman_stat:.5f}, p-value = {hausman_p_value:.5f}\n"
|
71 |
results += weak_instrument_results + "\n"
|
72 |
+
results += f"\nSargan test\nNull hypothesis: all instruments are valid\nSargan statistic = {sargan_stat:.5f}, p-value = {sargan_p_value:.5f}\n\nSargan test (overidentification test) is only applicable when the model is overidentified (IVs > Endogenous X's)."
|
73 |
|
74 |
return results
|
75 |
|