diffindiff 2.0.5__tar.gz → 2.0.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.
- {diffindiff-2.0.5 → diffindiff-2.0.7}/PKG-INFO +7 -16
- {diffindiff-2.0.5 → diffindiff-2.0.7}/README.md +5 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/didanalysis.py +3 -4
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/diddata.py +6 -3
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/didtools.py +3 -3
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/tests/tests_diffindiff.py +2 -2
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff.egg-info/PKG-INFO +7 -16
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff.egg-info/requires.txt +2 -1
- {diffindiff-2.0.5 → diffindiff-2.0.7}/setup.py +3 -2
- {diffindiff-2.0.5 → diffindiff-2.0.7}/MANIFEST.in +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/__init__.py +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/tests/__init__.py +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/tests/data/Corona_Hesse.xlsx +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/tests/data/counties_DE.csv +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff/tests/data/curfew_DE.csv +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff.egg-info/SOURCES.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff.egg-info/dependency_links.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/diffindiff.egg-info/top_level.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.7}/setup.cfg +0 -0
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: diffindiff
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: diffindiff: Python library for convenient Difference-in-Differences Analyses
|
|
5
5
|
Author: Thomas Wieland
|
|
6
6
|
Author-email: geowieland@googlemail.com
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: numpy
|
|
9
|
-
Requires-Dist: pandas
|
|
10
|
-
Requires-Dist: statsmodels
|
|
11
|
-
Requires-Dist: matplotlib
|
|
12
|
-
Requires-Dist: datetime
|
|
13
|
-
Requires-Dist: scikit-learn
|
|
14
|
-
Requires-Dist: xgboost
|
|
15
|
-
Requires-Dist: lightgbm
|
|
16
|
-
Dynamic: author
|
|
17
|
-
Dynamic: author-email
|
|
18
|
-
Dynamic: description
|
|
19
|
-
Dynamic: description-content-type
|
|
20
|
-
Dynamic: requires-dist
|
|
21
|
-
Dynamic: summary
|
|
22
8
|
|
|
23
9
|
# diffindiff: Difference-in-Differences (DiD) Analysis Python Library
|
|
24
10
|
|
|
@@ -30,6 +16,11 @@ This Python library is designed for performing Difference-in-Differences (DiD) a
|
|
|
30
16
|
Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geowieland@googlemail.com)
|
|
31
17
|
|
|
32
18
|
|
|
19
|
+
## Updates v2.0.7
|
|
20
|
+
- Bugfixes:
|
|
21
|
+
- Specific definition of dependencies to ensure compatibility between statsmodels and scipy
|
|
22
|
+
|
|
23
|
+
|
|
33
24
|
## Features
|
|
34
25
|
|
|
35
26
|
- **Data preparation and pre-analysis**:
|
|
@@ -8,6 +8,11 @@ This Python library is designed for performing Difference-in-Differences (DiD) a
|
|
|
8
8
|
Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geowieland@googlemail.com)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
## Updates v2.0.7
|
|
12
|
+
- Bugfixes:
|
|
13
|
+
- Specific definition of dependencies to ensure compatibility between statsmodels and scipy
|
|
14
|
+
|
|
15
|
+
|
|
11
16
|
## Features
|
|
12
17
|
|
|
13
18
|
- **Data preparation and pre-analysis**:
|
|
@@ -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.0.
|
|
8
|
-
# Last update: 2025-
|
|
7
|
+
# Version: 2.0.7
|
|
8
|
+
# Last update: 2025-09-02 18:33
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
@@ -15,7 +15,6 @@ from statsmodels.formula.api import ols
|
|
|
15
15
|
import numpy as np
|
|
16
16
|
import matplotlib.pyplot as plt
|
|
17
17
|
from matplotlib.dates import DateFormatter
|
|
18
|
-
import json
|
|
19
18
|
import diffindiff.didtools
|
|
20
19
|
|
|
21
20
|
|
|
@@ -1317,7 +1316,7 @@ def did_analysis(
|
|
|
1317
1316
|
group_by: str = None,
|
|
1318
1317
|
covariates: list = [],
|
|
1319
1318
|
group_benefit: list = [],
|
|
1320
|
-
placebo = False,
|
|
1319
|
+
placebo: bool = False,
|
|
1321
1320
|
confint_alpha = 0.05,
|
|
1322
1321
|
bonferroni: bool = False,
|
|
1323
1322
|
freq = "D",
|
|
@@ -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.0.
|
|
8
|
-
# Last update: 2025-04
|
|
7
|
+
# Version: 2.0.6
|
|
8
|
+
# Last update: 2025-06-04 07:51
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
@@ -829,10 +829,13 @@ def merge_data(
|
|
|
829
829
|
if treatment_config["after_treatment_period"]:
|
|
830
830
|
did_modeldata[after_treatment_name] = did_modeldata[TG_col] * did_modeldata[ATT_col]
|
|
831
831
|
|
|
832
|
+
if np.dtype(did_modeldata["t"]) != np.dtype(outcome_data[time_col]):
|
|
833
|
+
print("WARNING: Time columns of treatment data and outcome data differ: " + str(np.dtype(did_modeldata["t"])) + ", " + str(np.dtype(outcome_data[time_col])) + ". This might induce an error while building the model dataset.")
|
|
834
|
+
|
|
832
835
|
did_modeldata["unit_time"] = did_modeldata["unit_UID"].astype(str) + "_" + did_modeldata["t"].astype(str)
|
|
833
836
|
|
|
834
837
|
outcome_data["unit_time"] = outcome_data[unit_id_col].astype(str) + "_" + outcome_data[time_col].astype(str)
|
|
835
|
-
|
|
838
|
+
|
|
836
839
|
if keep_columns:
|
|
837
840
|
outcome_data_short = outcome_data
|
|
838
841
|
else:
|
|
@@ -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.0.
|
|
8
|
-
# Last update: 2025-04
|
|
7
|
+
# Version: 2.0.6
|
|
8
|
+
# Last update: 2025-06-04 07:52
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
@@ -239,7 +239,7 @@ def is_parallel(
|
|
|
239
239
|
date_col = time_col,
|
|
240
240
|
new_col = "date_counter"
|
|
241
241
|
)
|
|
242
|
-
data_test["TG_x_t"] = data_test["TG"]*data_test["date_counter"]
|
|
242
|
+
data_test["TG_x_t"] = data_test["TG"]*data_test["date_counter"]
|
|
243
243
|
|
|
244
244
|
test_ols_model = ols(f'{outcome_col} ~ TG + date_counter + TG_x_t', data = data_test).fit()
|
|
245
245
|
coef_TG_x_t_p = test_ols_model.pvalues["TG_x_t"]
|
|
@@ -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.0.
|
|
8
|
-
# Last update: 2025-04
|
|
7
|
+
# Version: 2.0.6
|
|
8
|
+
# Last update: 2025-06-04 07:52
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: diffindiff
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: diffindiff: Python library for convenient Difference-in-Differences Analyses
|
|
5
5
|
Author: Thomas Wieland
|
|
6
6
|
Author-email: geowieland@googlemail.com
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: numpy
|
|
9
|
-
Requires-Dist: pandas
|
|
10
|
-
Requires-Dist: statsmodels
|
|
11
|
-
Requires-Dist: matplotlib
|
|
12
|
-
Requires-Dist: datetime
|
|
13
|
-
Requires-Dist: scikit-learn
|
|
14
|
-
Requires-Dist: xgboost
|
|
15
|
-
Requires-Dist: lightgbm
|
|
16
|
-
Dynamic: author
|
|
17
|
-
Dynamic: author-email
|
|
18
|
-
Dynamic: description
|
|
19
|
-
Dynamic: description-content-type
|
|
20
|
-
Dynamic: requires-dist
|
|
21
|
-
Dynamic: summary
|
|
22
8
|
|
|
23
9
|
# diffindiff: Difference-in-Differences (DiD) Analysis Python Library
|
|
24
10
|
|
|
@@ -30,6 +16,11 @@ This Python library is designed for performing Difference-in-Differences (DiD) a
|
|
|
30
16
|
Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geowieland@googlemail.com)
|
|
31
17
|
|
|
32
18
|
|
|
19
|
+
## Updates v2.0.7
|
|
20
|
+
- Bugfixes:
|
|
21
|
+
- Specific definition of dependencies to ensure compatibility between statsmodels and scipy
|
|
22
|
+
|
|
23
|
+
|
|
33
24
|
## Features
|
|
34
25
|
|
|
35
26
|
- **Data preparation and pre-analysis**:
|
|
@@ -7,7 +7,7 @@ def read_README():
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name='diffindiff',
|
|
10
|
-
version='2.0.
|
|
10
|
+
version='2.0.7',
|
|
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,
|
|
@@ -22,7 +22,8 @@ setup(
|
|
|
22
22
|
install_requires=[
|
|
23
23
|
'numpy',
|
|
24
24
|
'pandas',
|
|
25
|
-
'statsmodels',
|
|
25
|
+
'statsmodels==0.14.2',
|
|
26
|
+
'scipy==1.15.3',
|
|
26
27
|
'matplotlib',
|
|
27
28
|
'datetime',
|
|
28
29
|
'scikit-learn',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|