Skip to content

Commit

Permalink
Updating utils.py and a few tests tolerances
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrovma committed Jun 24, 2024
1 parent 4fa1f67 commit b4df185
Show file tree
Hide file tree
Showing 7 changed files with 904 additions and 1,559 deletions.
6 changes: 0 additions & 6 deletions spreg/error_sp_het.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ def __init__(self, y, x, w, max_iter=1, epsilon=0.00001, step1c=False, hard_boun
else:
lambda2 = lambda1

# Forcing the 1st step lambda to be in the range [-0.9, 0.9] to avoid perfect collinearity in step 2 in case of SLX-Error or GNS models
#if lambda2 > 0.9:
# lambda_old = 0.9
#elif lambda2 < -0.9:
# lambda_old = -0.9
#else:
lambda_old = lambda2

self.iteration, eps = 0, 1
Expand Down
2 changes: 2 additions & 0 deletions spreg/ml_lag_regimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ def _work(
model.aic = DIAG.akaike(reg=model)
model.schwarz = DIAG.schwarz(reg=model)
model.slx_lags = slx_lags
model.w = w_r
model.rho = model.betas[-1]
return model


Expand Down
769 changes: 294 additions & 475 deletions spreg/tests/test_error_sp_het.py

Large diffs are not rendered by default.

Loading

0 comments on commit b4df185

Please sign in to comment.