diffindiff 2.2.1__tar.gz → 2.2.3__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.2.1 → diffindiff-2.2.3}/PKG-INFO +3 -3
- {diffindiff-2.2.1 → diffindiff-2.2.3}/README.md +2 -2
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/config.py +15 -14
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/didanalysis.py +5 -2
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/didanalysis_helper.py +16 -9
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff.egg-info/PKG-INFO +3 -3
- {diffindiff-2.2.1 → diffindiff-2.2.3}/setup.py +1 -1
- {diffindiff-2.2.1 → diffindiff-2.2.3}/MANIFEST.in +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/__init__.py +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/diddata.py +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/didtools.py +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/tests/__init__.py +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/tests/data/Corona_Hesse.xlsx +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/tests/data/counties_DE.csv +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/tests/data/curfew_DE.csv +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff/tests/tests_diffindiff.py +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff.egg-info/SOURCES.txt +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff.egg-info/dependency_links.txt +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff.egg-info/requires.txt +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/diffindiff.egg-info/top_level.txt +0 -0
- {diffindiff-2.2.1 → diffindiff-2.2.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: diffindiff
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: diffindiff: Python library for convenient Difference-in-Differences Analyses
|
|
5
5
|
Author: Thomas Wieland
|
|
6
6
|
Author-email: geowieland@googlemail.com
|
|
@@ -16,9 +16,9 @@ This Python library is designed for performing Difference-in-Differences (DiD) a
|
|
|
16
16
|
Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geowieland@googlemail.com)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
## Updates v2.2.
|
|
19
|
+
## Updates v2.2.3
|
|
20
20
|
- Bugfixes:
|
|
21
|
-
-
|
|
21
|
+
- Spillover treatment really works now
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
## Features
|
|
@@ -8,9 +8,9 @@ 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.2.
|
|
11
|
+
## Updates v2.2.3
|
|
12
12
|
- Bugfixes:
|
|
13
|
-
-
|
|
13
|
+
- Spillover treatment really works now
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
# Author: Thomas Wieland
|
|
5
5
|
# ORCID: 0000-0001-5168-9846
|
|
6
6
|
# mail: geowieland@googlemail.com
|
|
7
|
-
# Version: 1.0.
|
|
8
|
-
# Last update: 2025-12-06
|
|
7
|
+
# Version: 1.0.4
|
|
8
|
+
# Last update: 2025-12-06 11:52
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
12
12
|
# Basic config:
|
|
13
13
|
|
|
14
|
-
PACKAGE_VERSION = "2.2.
|
|
14
|
+
PACKAGE_VERSION = "2.2.2"
|
|
15
15
|
|
|
16
|
-
VERBOSE =
|
|
16
|
+
VERBOSE = False
|
|
17
17
|
|
|
18
18
|
ROUND_STATISTIC = 3
|
|
19
19
|
ROUND_PERCENT = 2
|
|
@@ -71,16 +71,6 @@ DELIMITER_INTERACT = "x"
|
|
|
71
71
|
|
|
72
72
|
COL_ABBREV = "col"
|
|
73
73
|
|
|
74
|
-
DUMMY_PREFIX = "DUMMY"
|
|
75
|
-
LOG_PREFIX = "log"
|
|
76
|
-
OBSERVED_SUFFIX = "observed"
|
|
77
|
-
EXPECTED_SUFFIX = "expected"
|
|
78
|
-
PREDICTED_SUFFIX = "pred"
|
|
79
|
-
CI_LOWER_SUFFIX = "CI_lower"
|
|
80
|
-
CI_UPPER_SUFFIX = "CI_upper"
|
|
81
|
-
PI_LOWER_SUFFIX = "PI_lower"
|
|
82
|
-
PI_UPPER_SUFFIX = "PI_upper"
|
|
83
|
-
|
|
84
74
|
TG_COL = "TG"
|
|
85
75
|
CG_COL = "CG"
|
|
86
76
|
BG_COL = "BG"
|
|
@@ -92,6 +82,17 @@ UNIT_TIME_COL = f"{UNIT_COL}{DELIMITER}{TIME_COL}"
|
|
|
92
82
|
TIME_COUNTER_COL = "time_counter"
|
|
93
83
|
TREATMENT_COL = f"{TG_COL}{DELIMITER_INTERACT}{TT_COL}"
|
|
94
84
|
|
|
85
|
+
DUMMY_PREFIX = "DUMMY"
|
|
86
|
+
LOG_PREFIX = "log"
|
|
87
|
+
OBSERVED_SUFFIX = "observed"
|
|
88
|
+
EXPECTED_SUFFIX = "expected"
|
|
89
|
+
PREDICTED_SUFFIX = "pred"
|
|
90
|
+
CI_LOWER_SUFFIX = "CI_lower"
|
|
91
|
+
CI_UPPER_SUFFIX = "CI_upper"
|
|
92
|
+
PI_LOWER_SUFFIX = "PI_lower"
|
|
93
|
+
PI_UPPER_SUFFIX = "PI_upper"
|
|
94
|
+
SPILLOVER_PREFIX = "Spillover"
|
|
95
|
+
SPILLOVER_UNIT_PREFIX = f"{SPILLOVER_PREFIX}{DELIMITER}{UNIT_COL}"
|
|
95
96
|
|
|
96
97
|
# Modeling config:
|
|
97
98
|
|
|
@@ -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.2.
|
|
8
|
-
# Last update: 2025-12-
|
|
7
|
+
# Version: 2.2.1
|
|
8
|
+
# Last update: 2025-12-06 12:26
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
@@ -40,6 +40,9 @@ class DiffModel:
|
|
|
40
40
|
timestamp
|
|
41
41
|
]
|
|
42
42
|
|
|
43
|
+
def get_did_modeldata_df (self):
|
|
44
|
+
return pd.DataFrame(self.data[2])
|
|
45
|
+
|
|
43
46
|
def treatment_statistics(
|
|
44
47
|
self,
|
|
45
48
|
treatment: str = None,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
# Author: Thomas Wieland
|
|
5
5
|
# ORCID: 0000-0001-5168-9846
|
|
6
6
|
# mail: geowieland@googlemail.com
|
|
7
|
-
# Version: 1.0.
|
|
8
|
-
# Last update: 2025-12-
|
|
7
|
+
# Version: 1.0.4
|
|
8
|
+
# Last update: 2025-12-06 12:26
|
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
|
10
10
|
#-----------------------------------------------------------------------
|
|
11
11
|
|
|
@@ -189,16 +189,23 @@ def create_spillover(
|
|
|
189
189
|
spillover_unit_vars = []
|
|
190
190
|
spillover_treatment_vars = []
|
|
191
191
|
|
|
192
|
-
for
|
|
192
|
+
for treatment in treatment_col:
|
|
193
|
+
|
|
194
|
+
sp_unit_col = f"{config.SPILLOVER_UNIT_PREFIX}{config.DELIMITER}{treatment}"
|
|
195
|
+
sp_treatment_col = f"{config.SPILLOVER_PREFIX}{config.DELIMITER}{treatment}"
|
|
193
196
|
|
|
194
|
-
data[
|
|
195
|
-
data[
|
|
197
|
+
data[sp_unit_col] = 0
|
|
198
|
+
data[sp_treatment_col] = 0
|
|
196
199
|
|
|
197
|
-
spillover_unit_vars.append(
|
|
198
|
-
|
|
200
|
+
spillover_unit_vars.append(sp_unit_col)
|
|
201
|
+
spillover_treatment_vars.append(sp_treatment_col)
|
|
199
202
|
|
|
200
|
-
data.loc[
|
|
201
|
-
|
|
203
|
+
data.loc[
|
|
204
|
+
data[unit_col].astype(str).isin(spillover_units),
|
|
205
|
+
sp_unit_col
|
|
206
|
+
] = 1
|
|
207
|
+
|
|
208
|
+
data[sp_treatment_col] = data[sp_unit_col]*data[treatment]
|
|
202
209
|
|
|
203
210
|
spillover_treatment_vars_join = ' + '.join(spillover_treatment_vars)
|
|
204
211
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: diffindiff
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: diffindiff: Python library for convenient Difference-in-Differences Analyses
|
|
5
5
|
Author: Thomas Wieland
|
|
6
6
|
Author-email: geowieland@googlemail.com
|
|
@@ -16,9 +16,9 @@ This Python library is designed for performing Difference-in-Differences (DiD) a
|
|
|
16
16
|
Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geowieland@googlemail.com)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
## Updates v2.2.
|
|
19
|
+
## Updates v2.2.3
|
|
20
20
|
- Bugfixes:
|
|
21
|
-
-
|
|
21
|
+
- Spillover treatment really works now
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
## Features
|
|
@@ -8,7 +8,7 @@ def read_README():
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='diffindiff',
|
|
11
|
-
version='2.2.
|
|
11
|
+
version='2.2.3',
|
|
12
12
|
description='diffindiff: Python library for convenient Difference-in-Differences Analyses',
|
|
13
13
|
packages=find_packages(include=["diffindiff", "diffindiff.tests"]),
|
|
14
14
|
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
|
|
File without changes
|
|
File without changes
|