econmethods 1.6.5__tar.gz → 1.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: econmethods
3
- Version: 1.6.5
3
+ Version: 1.7
4
4
  Summary: A python package implementing various econometrical tests and estimators
5
5
  Home-page: https://github.com/NaturionBG/econmethods
6
6
  Author: NaturionBG
@@ -528,16 +528,17 @@ class FECM:
528
528
  dct['ar'] = self.__ar
529
529
  coefs = []
530
530
  F_pvalues = []
531
- tpvalues = []
532
531
  rsq = []
533
532
  for result in self.__sr:
534
533
  coefs.append(result.params)
535
534
  F_pvalues.append(result.f_pvalue)
536
- tpvalues.append(result.pvalues)
537
535
  rsq.append(result.rsquared)
538
- coef_mean = pd.DataFrame(pd.concat(coefs, axis=1).mean(axis=1), columns=['Mean Group coefs'])
536
+ coef_mean = pd.DataFrame(pd.concat(coefs, axis=1).mean(axis=1))
537
+ coef_std = pd.DataFrame(pd.concat(coefs, axis=1).std(axis=1))
538
+ coef_mse = coef_std/np.sqrt(self.__N)
539
+ t_means = coef_mean / coef_mse
539
540
  F_pval_mean = np.array(F_pvalues).mean()
540
- tpvalues_mean = pd.DataFrame(pd.concat(tpvalues, axis=1).mean(axis=1), columns = ['Mean Group T-pvalues'])
541
+ tpvalues_mean = pd.DataFrame(np.vectorize(lambda x: 2*min(sc.t(self.__N-1).cdf(x), sc.t(self.__N-1).sf(x)))(t_means), columns=['T-Pvalues'])
541
542
  rsq_mean = np.array(rsq).mean()
542
543
  res = {
543
544
  'Rsquared': rsq_mean,
@@ -683,7 +684,7 @@ class SlopeHomogeneityF:
683
684
  if pval < self.__alpha:
684
685
  print(f'P-Value: {pval} < Alpha: {self.__alpha}, hence your data does not fit slope homogeneity.')
685
686
  else:
686
- print(f'P-Value: {pval} < Alpha: {self.__alpha}, hence your data fits slope homogeneity.')
687
+ print(f'P-Value: {pval} > Alpha: {self.__alpha}, hence your data fits slope homogeneity.')
687
688
 
688
689
  def __del__(self) -> None:
689
690
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: econmethods
3
- Version: 1.6.5
3
+ Version: 1.7
4
4
  Summary: A python package implementing various econometrical tests and estimators
5
5
  Home-page: https://github.com/NaturionBG/econmethods
6
6
  Author: NaturionBG
@@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
5
5
 
6
6
  setup(
7
7
  name = 'econmethods',
8
- version = 'v1.6.5',
8
+ version = 'v1.7',
9
9
  description='A python package implementing various econometrical tests and estimators',
10
10
  packages = find_packages(),
11
11
  long_description=long_desc,
File without changes
File without changes