diffindiff 2.3.5__tar.gz → 2.3.6__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.5 → diffindiff-2.3.6}/PKG-INFO +7 -8
  2. {diffindiff-2.3.5 → diffindiff-2.3.6}/README.md +6 -7
  3. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/config.py +3 -3
  4. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/didanalysis.py +9 -5
  5. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff.egg-info/PKG-INFO +7 -8
  6. {diffindiff-2.3.5 → diffindiff-2.3.6}/setup.py +1 -1
  7. {diffindiff-2.3.5 → diffindiff-2.3.6}/MANIFEST.in +0 -0
  8. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/__init__.py +0 -0
  9. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/didanalysis_helper.py +0 -0
  10. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/diddata.py +0 -0
  11. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/didtools.py +0 -0
  12. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/tests/__init__.py +0 -0
  13. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/tests/data/Corona_Hesse.xlsx +0 -0
  14. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/tests/data/counties_DE.csv +0 -0
  15. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/tests/data/curfew_DE.csv +0 -0
  16. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff/tests/tests_diffindiff.py +0 -0
  17. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff.egg-info/SOURCES.txt +0 -0
  18. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff.egg-info/dependency_links.txt +0 -0
  19. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff.egg-info/requires.txt +0 -0
  20. {diffindiff-2.3.5 → diffindiff-2.3.6}/diffindiff.egg-info/top_level.txt +0 -0
  21. {diffindiff-2.3.5 → diffindiff-2.3.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffindiff
3
- Version: 2.3.5
3
+ Version: 2.3.6
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.5) [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.6) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
31
31
 
32
32
 
33
33
  ## Installation
@@ -173,10 +173,9 @@ 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.5)
176
+ ## What's new (v2.3.6)
177
177
 
178
- - Bugfixes:
179
- - Test whether input data is panel data via didtools.is_panel() which is included in didanalysis_helper.data_diagnostics()
180
- - Fixed false test results given continuous treatments are accepted in didtools.is_simultaneous()
181
- - Fixed false test results given continuous treatments are accepted in didtools.is_prepost()
182
- - Argument 'pre_post' is passed to is_simultaneous() in didanalysis_helper.treatment_diagnostics()
178
+ - Bugfixes:
179
+ - Bug in DiffModel.placebo() with respect to missing treatment period and time columns fixed
180
+ - Collecting treatment column errors in DiffModel.placebo()
181
+ - Corrections in error messages
@@ -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.5) [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.6) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
23
23
 
24
24
 
25
25
  ## Installation
@@ -165,10 +165,9 @@ 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.5)
168
+ ## What's new (v2.3.6)
169
169
 
170
- - Bugfixes:
171
- - Test whether input data is panel data via didtools.is_panel() which is included in didanalysis_helper.data_diagnostics()
172
- - Fixed false test results given continuous treatments are accepted in didtools.is_simultaneous()
173
- - Fixed false test results given continuous treatments are accepted in didtools.is_prepost()
174
- - Argument 'pre_post' is passed to is_simultaneous() in didanalysis_helper.treatment_diagnostics()
170
+ - Bugfixes:
171
+ - Bug in DiffModel.placebo() with respect to missing treatment period and time columns fixed
172
+ - Collecting treatment column errors in DiffModel.placebo()
173
+ - Corrections in error messages
@@ -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.13
8
- # Last update: 2026-03-16 17:54
7
+ # Version: 1.0.14
8
+ # Last update: 2026-03-21 11:52
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.5"
15
+ PACKAGE_VERSION = "2.3.6"
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.4
8
- # Last update: 2026-03-16 17:39
7
+ # Version: 2.3.5
8
+ # Last update: 2026-03-21 11:56
9
9
  # Copyright (c) 2024-2026 Thomas Wieland
10
10
  #-----------------------------------------------------------------------
11
11
 
@@ -1292,11 +1292,13 @@ class DiffModel:
1292
1292
  TT_col_ = f"{config.TT_COL}{config.DELIMITER}{treatment}"
1293
1293
  TGxTT_ = f"Placebo{config.DELIMITER}{treatment}"
1294
1294
 
1295
+ treatment_col_errors = []
1295
1296
  if TG_col is None and TG_col_ not in model_config["TG_col"]:
1296
- raise ValueError(f"No treatment group identification variable for treatment {treatment}. Please state TG_col = your_treatment_group_dummy.")
1297
-
1297
+ treatment_col_errors.append(f"No treatment group identification variable for treatment '{treatment}'. State parameter 'TG_col' = <<your_treatment_group_dummy>> (e.g., 'TG_{treatment}').")
1298
1298
  if TT_col is None and TT_col_ not in model_config["TT_col"]:
1299
- raise ValueError(f"No treatment time variable for treatment {treatment}. Please state TG_col = your_treatment_time_dummy.")
1299
+ treatment_col_errors.append(f"No treatment time variable for treatment '{treatment}'. State parameter 'TT_col' = <<your_treatment_time_dummy>> (e.g., 'TT_{treatment}.)")
1300
+ if len(treatment_col_errors) > 0:
1301
+ raise ValueError(f"Missing arguments in placebo analysis: {' '.join(treatment_col_errors)}")
1300
1302
 
1301
1303
  if TG_col is not None:
1302
1304
  TG_col_ = TG_col
@@ -1327,6 +1329,8 @@ class DiffModel:
1327
1329
 
1328
1330
  model_data_c[TG_col_] = 0
1329
1331
  model_data_c.loc[(model_data_c[unit_col].isin(units_random_sample)), TG_col_] = 1
1332
+ model_data_c[TT_col_] = 0
1333
+ model_data_c.loc[((model_data_c[time_col] >= treatment_period_start) & (model_data_c[time_col] <= treatment_period_end)), TT_col_] = 1
1330
1334
  model_data_c[TGxTT_] = model_data_c[TG_col_] * model_data_c[TT_col_]
1331
1335
 
1332
1336
  model_data_c_analysis = did_analysis(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffindiff
3
- Version: 2.3.5
3
+ Version: 2.3.6
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.5) [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.6) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.18656820
31
31
 
32
32
 
33
33
  ## Installation
@@ -173,10 +173,9 @@ 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.5)
176
+ ## What's new (v2.3.6)
177
177
 
178
- - Bugfixes:
179
- - Test whether input data is panel data via didtools.is_panel() which is included in didanalysis_helper.data_diagnostics()
180
- - Fixed false test results given continuous treatments are accepted in didtools.is_simultaneous()
181
- - Fixed false test results given continuous treatments are accepted in didtools.is_prepost()
182
- - Argument 'pre_post' is passed to is_simultaneous() in didanalysis_helper.treatment_diagnostics()
178
+ - Bugfixes:
179
+ - Bug in DiffModel.placebo() with respect to missing treatment period and time columns fixed
180
+ - Collecting treatment column errors in DiffModel.placebo()
181
+ - Corrections in error messages
@@ -7,7 +7,7 @@ def read_README():
7
7
 
8
8
  setup(
9
9
  name='diffindiff',
10
- version='2.3.5',
10
+ version='2.3.6',
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