econmethods 3.0.2__tar.gz → 3.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {econmethods-3.0.2 → econmethods-3.0.3}/PKG-INFO +1 -1
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods/Lib.py +19 -4
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods.egg-info/PKG-INFO +1 -1
- {econmethods-3.0.2 → econmethods-3.0.3}/setup.py +1 -1
- {econmethods-3.0.2 → econmethods-3.0.3}/README.md +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods/CADF_Crit_Values.xlsx +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods/__init__.py +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods.egg-info/SOURCES.txt +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods.egg-info/dependency_links.txt +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods.egg-info/requires.txt +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/econmethods.egg-info/top_level.txt +0 -0
- {econmethods-3.0.2 → econmethods-3.0.3}/setup.cfg +0 -0
|
@@ -444,7 +444,10 @@ class FECM:
|
|
|
444
444
|
flag = True
|
|
445
445
|
for coef, t in zip(res_lr.params.index, res_lr.pvalues):
|
|
446
446
|
if t > self.sf:
|
|
447
|
-
|
|
447
|
+
if coef != 'const':
|
|
448
|
+
lr_fe = lr_fe.drop(columns=[coef])
|
|
449
|
+
else:
|
|
450
|
+
self.__lr_c = False
|
|
448
451
|
flag=False
|
|
449
452
|
if flag:
|
|
450
453
|
break
|
|
@@ -513,7 +516,11 @@ class FECM:
|
|
|
513
516
|
est.append(sm.OLS(model['target_diff'], sm.add_constant(model.iloc[:, 3:])).fit())
|
|
514
517
|
else:
|
|
515
518
|
est.append(sm.OLS(model['target_diff'], model.iloc[:, 3:]).fit())
|
|
516
|
-
|
|
519
|
+
if 'const' not in drop:
|
|
520
|
+
self.__ccemg_units[i] = self.__ccemg_units[i].drop(columns=drop)
|
|
521
|
+
else:
|
|
522
|
+
self.__C = False
|
|
523
|
+
drop = drop.remove('const')
|
|
517
524
|
return est
|
|
518
525
|
elif self.__method == 'mg':
|
|
519
526
|
units = self.__mg_units
|
|
@@ -523,7 +530,11 @@ class FECM:
|
|
|
523
530
|
est.append(sm.OLS(model['target_diff'], sm.add_constant(model.iloc[:, 3:])).fit())
|
|
524
531
|
else:
|
|
525
532
|
est.append(sm.OLS(model['target_diff'], model.iloc[:, 3:]).fit())
|
|
526
|
-
|
|
533
|
+
if 'const' not in drop:
|
|
534
|
+
self.__mg_units[i] = self.__mg_units[i].drop(columns=drop)
|
|
535
|
+
else:
|
|
536
|
+
self.__C = False
|
|
537
|
+
drop = drop.remove('const')
|
|
527
538
|
return est
|
|
528
539
|
elif self.__method == 'ccep':
|
|
529
540
|
units = self.get_ccemg_frames(self.__lag)
|
|
@@ -538,7 +549,11 @@ class FECM:
|
|
|
538
549
|
ts = []
|
|
539
550
|
flag = True
|
|
540
551
|
if max(zip(est[0].params.index, est[0].pvalues), key=lambda x: x[1])[1] > self.sf:
|
|
541
|
-
|
|
552
|
+
to_drop = max(zip(est[0].params.index, est[0].pvalues), key=lambda x: x[1])[0]
|
|
553
|
+
if to_drop != 'const':
|
|
554
|
+
pool = pool.drop(columns=[to_drop])
|
|
555
|
+
else:
|
|
556
|
+
self.__C = False
|
|
542
557
|
flag=False
|
|
543
558
|
for i in self.x_difs:
|
|
544
559
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|