diffindiff 2.3.7__tar.gz → 2.3.8__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.
Files changed (21) hide show
  1. {diffindiff-2.3.7 → diffindiff-2.3.8}/PKG-INFO +4 -12
  2. {diffindiff-2.3.7 → diffindiff-2.3.8}/README.md +3 -11
  3. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/config.py +3 -3
  4. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/didanalysis.py +7 -11
  5. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff.egg-info/PKG-INFO +4 -12
  6. {diffindiff-2.3.7 → diffindiff-2.3.8}/setup.py +1 -1
  7. {diffindiff-2.3.7 → diffindiff-2.3.8}/MANIFEST.in +0 -0
  8. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/__init__.py +0 -0
  9. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/didanalysis_helper.py +0 -0
  10. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/diddata.py +0 -0
  11. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/didtools.py +0 -0
  12. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/tests/__init__.py +0 -0
  13. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/tests/data/Corona_Hesse.xlsx +0 -0
  14. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/tests/data/counties_DE.csv +0 -0
  15. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/tests/data/curfew_DE.csv +0 -0
  16. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff/tests/tests_diffindiff.py +0 -0
  17. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff.egg-info/SOURCES.txt +0 -0
  18. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff.egg-info/dependency_links.txt +0 -0
  19. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff.egg-info/requires.txt +0 -0
  20. {diffindiff-2.3.7 → diffindiff-2.3.8}/diffindiff.egg-info/top_level.txt +0 -0
  21. {diffindiff-2.3.7 → diffindiff-2.3.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffindiff
3
- Version: 2.3.7
3
+ Version: 2.3.8
4
4
  Summary: diffindiff: Python library for convenient Difference-in-Differences analyses
5
5
  Author: Thomas Wieland
6
6
  Author-email: geowieland@googlemail.com
@@ -27,7 +27,7 @@ Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geo
27
27
 
28
28
  If you use this software, please cite:
29
29
 
30
- Wieland, T. (2026). diffindiff: A Python library for convenient difference-in-differences analyses (Version 2.3.7) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
30
+ Wieland, T. (2026). diffindiff: A Python library for convenient difference-in-differences analyses (Version 2.3.8) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
31
31
 
32
32
 
33
33
  ## Installation
@@ -173,15 +173,7 @@ See the /tests directory for usage examples of most of the included functions.
173
173
  This software was developed without the use of AI-generated code. The Continue Agent in Microsoft Visual Studio Code using the GPT-5 mini model (by OpenAI) was used solely to assist in drafting and refining docstrings for documentation. The corresponding guidelines and constraints defined by the author are documented in `AGENTS-docstrings.md` in the [public GitHub repository](https://github.com/geowieland/diffindiff_official).
174
174
 
175
175
 
176
- ## What's new (v2.3.7)
176
+ ## What's new (v2.3.8)
177
177
 
178
- - Extensions:
179
- - DiffModel.counterfactual() and DiffModel.plot_counterfactual(): Re-transform log-transformed outcome via parameter retransform_log_outcome
180
- - Difference between predicted and counterfactual-predicted in result df of DiffModel.counterfactual()
181
- - Extended parameters in didtools.model_wrapper() to be passed to sklearn.model_selection.train_test_split()
182
- - Extension of documentations
183
178
  - Bugfixes:
184
- - diddata.create_counterfactual(): Fixed calculation error, additional check of input parameters
185
- - didtools.is_prepost() now also checks number of observational units
186
- - didtools.is_notreatment() now checks whether data is singular with respect to 0 and 1
187
- - didtools.fit_metrics() tries to convert observed and expected if not numeric before raising TypeError
179
+ - DiffModel.plot() always shows the correct values if retransform_log_outcome is used
@@ -19,7 +19,7 @@ Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geo
19
19
 
20
20
  If you use this software, please cite:
21
21
 
22
- Wieland, T. (2026). diffindiff: A Python library for convenient difference-in-differences analyses (Version 2.3.7) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
22
+ Wieland, T. (2026). diffindiff: A Python library for convenient difference-in-differences analyses (Version 2.3.8) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
23
23
 
24
24
 
25
25
  ## Installation
@@ -165,15 +165,7 @@ See the /tests directory for usage examples of most of the included functions.
165
165
  This software was developed without the use of AI-generated code. The Continue Agent in Microsoft Visual Studio Code using the GPT-5 mini model (by OpenAI) was used solely to assist in drafting and refining docstrings for documentation. The corresponding guidelines and constraints defined by the author are documented in `AGENTS-docstrings.md` in the [public GitHub repository](https://github.com/geowieland/diffindiff_official).
166
166
 
167
167
 
168
- ## What's new (v2.3.7)
168
+ ## What's new (v2.3.8)
169
169
 
170
- - Extensions:
171
- - DiffModel.counterfactual() and DiffModel.plot_counterfactual(): Re-transform log-transformed outcome via parameter retransform_log_outcome
172
- - Difference between predicted and counterfactual-predicted in result df of DiffModel.counterfactual()
173
- - Extended parameters in didtools.model_wrapper() to be passed to sklearn.model_selection.train_test_split()
174
- - Extension of documentations
175
170
  - Bugfixes:
176
- - diddata.create_counterfactual(): Fixed calculation error, additional check of input parameters
177
- - didtools.is_prepost() now also checks number of observational units
178
- - didtools.is_notreatment() now checks whether data is singular with respect to 0 and 1
179
- - didtools.fit_metrics() tries to convert observed and expected if not numeric before raising TypeError
171
+ - DiffModel.plot() always shows the correct values if retransform_log_outcome is used
@@ -4,15 +4,15 @@
4
4
  # Author: Thomas Wieland
5
5
  # ORCID: 0000-0001-5168-9846
6
6
  # mail: geowieland@googlemail.com
7
- # Version: 1.0.15
8
- # Last update: 2026-03-24 18:04
7
+ # Version: 1.0.16
8
+ # Last update: 2026-04-21 20:19
9
9
  # Copyright (c) 2025-2026 Thomas Wieland
10
10
  #-----------------------------------------------------------------------
11
11
 
12
12
  # Basic config:
13
13
 
14
14
  PACKAGE_NAME = "diffindiff"
15
- PACKAGE_VERSION = "2.3.7"
15
+ PACKAGE_VERSION = "2.3.8"
16
16
 
17
17
  VERBOSE = False
18
18
 
@@ -4,8 +4,8 @@
4
4
  # Author: Thomas Wieland
5
5
  # ORCID: 0000-0001-5168-9846
6
6
  # mail: geowieland@googlemail.com
7
- # Version: 2.3.7
8
- # Last update: 2026-03-24 18:37
7
+ # Version: 2.3.8
8
+ # Last update: 2026-04-21 20:31
9
9
  # Copyright (c) 2024-2026 Thomas Wieland
10
10
  #-----------------------------------------------------------------------
11
11
 
@@ -1661,20 +1661,17 @@ class DiffModel:
1661
1661
  model_predictions = model_predictions.reset_index()
1662
1662
  model_predictions.rename(columns = {config.PREDICTIONS_SUMMARY_FRAME_COLS_LIST[0]: outcome_col_predicted}, inplace = True)
1663
1663
 
1664
- model_data = pd.concat ([model_data, model_predictions], axis = 1)
1664
+ model_data = pd.concat([model_data, model_predictions], axis = 1)
1665
1665
 
1666
+ if model_config["log_outcome"] and not retransform_log_outcome and y_lim is not None:
1667
+ print(f"NOTE: Outcome variable was log-transformed. Plotting is on log scale, but 'y_lim' is specified. The plot presentation might be nonsensical. Set param 'retransform_log_outcome' to True to re-transform to original scale for plotting.")
1668
+
1666
1669
  if retransform_log_outcome:
1667
1670
 
1668
1671
  if model_config["log_outcome"]:
1669
1672
 
1670
1673
  if outcome_col.startswith(f"{config.LOG_PREFIX}{config.DELIMITER}"):
1671
1674
 
1672
- model_data = model_data.rename(
1673
- columns = {
1674
- outcome_col: outcome_col[len(f"{config.LOG_PREFIX}{config.DELIMITER}"):]
1675
- }
1676
- )
1677
-
1678
1675
  outcome_col = outcome_col[len(f"{config.LOG_PREFIX}{config.DELIMITER}"):]
1679
1676
 
1680
1677
  if outcome_col_predicted.startswith(f"{config.LOG_PREFIX}{config.DELIMITER}"):
@@ -1686,8 +1683,7 @@ class DiffModel:
1686
1683
  )
1687
1684
 
1688
1685
  outcome_col_predicted = outcome_col_predicted[len(f"{config.LOG_PREFIX}{config.DELIMITER}"):]
1689
-
1690
- model_data[outcome_col] = np.exp(model_data[outcome_col])
1686
+
1691
1687
  model_data[outcome_col_predicted] = np.exp(model_data[outcome_col_predicted])
1692
1688
 
1693
1689
  model_data[config.PREDICTIONS_SUMMARY_FRAME_COLS_LIST[2]] = np.exp(model_data[config.PREDICTIONS_SUMMARY_FRAME_COLS_LIST[2]])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffindiff
3
- Version: 2.3.7
3
+ Version: 2.3.8
4
4
  Summary: diffindiff: Python library for convenient Difference-in-Differences analyses
5
5
  Author: Thomas Wieland
6
6
  Author-email: geowieland@googlemail.com
@@ -27,7 +27,7 @@ Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geo
27
27
 
28
28
  If you use this software, please cite:
29
29
 
30
- Wieland, T. (2026). diffindiff: A Python library for convenient difference-in-differences analyses (Version 2.3.7) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
30
+ Wieland, T. (2026). diffindiff: A Python library for convenient difference-in-differences analyses (Version 2.3.8) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
31
31
 
32
32
 
33
33
  ## Installation
@@ -173,15 +173,7 @@ See the /tests directory for usage examples of most of the included functions.
173
173
  This software was developed without the use of AI-generated code. The Continue Agent in Microsoft Visual Studio Code using the GPT-5 mini model (by OpenAI) was used solely to assist in drafting and refining docstrings for documentation. The corresponding guidelines and constraints defined by the author are documented in `AGENTS-docstrings.md` in the [public GitHub repository](https://github.com/geowieland/diffindiff_official).
174
174
 
175
175
 
176
- ## What's new (v2.3.7)
176
+ ## What's new (v2.3.8)
177
177
 
178
- - Extensions:
179
- - DiffModel.counterfactual() and DiffModel.plot_counterfactual(): Re-transform log-transformed outcome via parameter retransform_log_outcome
180
- - Difference between predicted and counterfactual-predicted in result df of DiffModel.counterfactual()
181
- - Extended parameters in didtools.model_wrapper() to be passed to sklearn.model_selection.train_test_split()
182
- - Extension of documentations
183
178
  - Bugfixes:
184
- - diddata.create_counterfactual(): Fixed calculation error, additional check of input parameters
185
- - didtools.is_prepost() now also checks number of observational units
186
- - didtools.is_notreatment() now checks whether data is singular with respect to 0 and 1
187
- - didtools.fit_metrics() tries to convert observed and expected if not numeric before raising TypeError
179
+ - DiffModel.plot() always shows the correct values if retransform_log_outcome is used
@@ -7,7 +7,7 @@ def read_README():
7
7
 
8
8
  setup(
9
9
  name='diffindiff',
10
- version='2.3.7',
10
+ version='2.3.8',
11
11
  description='diffindiff: Python library for convenient Difference-in-Differences analyses',
12
12
  packages=find_packages(include=["diffindiff", "diffindiff.tests"]),
13
13
  include_package_data=True,
File without changes
File without changes