diffindiff 2.0.5__tar.gz → 2.0.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.
- {diffindiff-2.0.5 → diffindiff-2.0.6}/PKG-INFO +2 -16
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/didanalysis.py +2 -3
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/diddata.py +6 -3
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/didtools.py +3 -3
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/tests/tests_diffindiff.py +2 -2
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff.egg-info/PKG-INFO +2 -16
- {diffindiff-2.0.5 → diffindiff-2.0.6}/setup.py +1 -1
- {diffindiff-2.0.5 → diffindiff-2.0.6}/MANIFEST.in +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/README.md +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/__init__.py +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/tests/__init__.py +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/tests/data/Corona_Hesse.xlsx +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/tests/data/counties_DE.csv +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff/tests/data/curfew_DE.csv +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff.egg-info/SOURCES.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff.egg-info/dependency_links.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff.egg-info/requires.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/diffindiff.egg-info/top_level.txt +0 -0
- {diffindiff-2.0.5 → diffindiff-2.0.6}/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.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
|
|
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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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.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
|
|
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
|
|
|
@@ -7,7 +7,7 @@ def read_README():
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name='diffindiff',
|
|
10
|
-
version='2.0.
|
|
10
|
+
version='2.0.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
|
|
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
|