diff-diff 0.5.0__py3-none-any.whl → 1.0.0__py3-none-any.whl

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.
diff_diff/__init__.py CHANGED
@@ -5,16 +5,57 @@ This library provides sklearn-like estimators for causal inference
5
5
  using the difference-in-differences methodology.
6
6
  """
7
7
 
8
+ from diff_diff.bacon import (
9
+ BaconDecomposition,
10
+ BaconDecompositionResults,
11
+ Comparison2x2,
12
+ bacon_decompose,
13
+ )
14
+ from diff_diff.diagnostics import (
15
+ PlaceboTestResults,
16
+ leave_one_out_test,
17
+ permutation_test,
18
+ placebo_group_test,
19
+ placebo_timing_test,
20
+ run_all_placebo_tests,
21
+ run_placebo_test,
22
+ )
8
23
  from diff_diff.estimators import (
9
24
  DifferenceInDifferences,
10
- TwoWayFixedEffects,
11
25
  MultiPeriodDiD,
12
26
  SyntheticDiD,
27
+ TwoWayFixedEffects,
13
28
  )
14
- from diff_diff.staggered import (
15
- CallawaySantAnna,
16
- CallawaySantAnnaResults,
17
- GroupTimeEffect,
29
+ from diff_diff.honest_did import (
30
+ DeltaRM,
31
+ DeltaSD,
32
+ DeltaSDRM,
33
+ HonestDiD,
34
+ HonestDiDResults,
35
+ SensitivityResults,
36
+ compute_honest_did,
37
+ sensitivity_plot,
38
+ )
39
+ from diff_diff.power import (
40
+ PowerAnalysis,
41
+ PowerResults,
42
+ SimulationPowerResults,
43
+ compute_mde,
44
+ compute_power,
45
+ compute_sample_size,
46
+ simulate_power,
47
+ )
48
+ from diff_diff.prep import (
49
+ aggregate_to_cohorts,
50
+ balance_panel,
51
+ create_event_time,
52
+ generate_did_data,
53
+ make_post_indicator,
54
+ make_treatment_indicator,
55
+ rank_control_units,
56
+ summarize_did_data,
57
+ validate_did_data,
58
+ wide_to_long,
18
59
  )
19
60
  from diff_diff.results import (
20
61
  DiDResults,
@@ -22,40 +63,29 @@ from diff_diff.results import (
22
63
  PeriodEffect,
23
64
  SyntheticDiDResults,
24
65
  )
25
- from diff_diff.visualization import (
26
- plot_event_study,
27
- plot_group_effects,
28
- )
29
- from diff_diff.prep import (
30
- make_treatment_indicator,
31
- make_post_indicator,
32
- wide_to_long,
33
- balance_panel,
34
- validate_did_data,
35
- summarize_did_data,
36
- generate_did_data,
37
- create_event_time,
38
- aggregate_to_cohorts,
39
- rank_control_units,
66
+ from diff_diff.staggered import (
67
+ CallawaySantAnna,
68
+ CallawaySantAnnaResults,
69
+ CSBootstrapResults,
70
+ GroupTimeEffect,
40
71
  )
41
72
  from diff_diff.utils import (
73
+ WildBootstrapResults,
42
74
  check_parallel_trends,
43
75
  check_parallel_trends_robust,
44
76
  equivalence_test_trends,
45
- WildBootstrapResults,
46
77
  wild_bootstrap_se,
47
78
  )
48
- from diff_diff.diagnostics import (
49
- PlaceboTestResults,
50
- run_placebo_test,
51
- placebo_timing_test,
52
- placebo_group_test,
53
- permutation_test,
54
- leave_one_out_test,
55
- run_all_placebo_tests,
79
+ from diff_diff.visualization import (
80
+ plot_bacon,
81
+ plot_event_study,
82
+ plot_group_effects,
83
+ plot_honest_event_study,
84
+ plot_power_curve,
85
+ plot_sensitivity,
56
86
  )
57
87
 
58
- __version__ = "0.5.0"
88
+ __version__ = "1.0.0"
59
89
  __all__ = [
60
90
  # Estimators
61
91
  "DifferenceInDifferences",
@@ -63,16 +93,25 @@ __all__ = [
63
93
  "MultiPeriodDiD",
64
94
  "SyntheticDiD",
65
95
  "CallawaySantAnna",
96
+ # Bacon Decomposition
97
+ "BaconDecomposition",
98
+ "BaconDecompositionResults",
99
+ "Comparison2x2",
100
+ "bacon_decompose",
101
+ "plot_bacon",
66
102
  # Results
67
103
  "DiDResults",
68
104
  "MultiPeriodDiDResults",
69
105
  "SyntheticDiDResults",
70
106
  "PeriodEffect",
71
107
  "CallawaySantAnnaResults",
108
+ "CSBootstrapResults",
72
109
  "GroupTimeEffect",
73
110
  # Visualization
74
111
  "plot_event_study",
75
112
  "plot_group_effects",
113
+ "plot_sensitivity",
114
+ "plot_honest_event_study",
76
115
  # Parallel trends testing
77
116
  "check_parallel_trends",
78
117
  "check_parallel_trends_robust",
@@ -99,4 +138,22 @@ __all__ = [
99
138
  "create_event_time",
100
139
  "aggregate_to_cohorts",
101
140
  "rank_control_units",
141
+ # Honest DiD sensitivity analysis
142
+ "HonestDiD",
143
+ "HonestDiDResults",
144
+ "SensitivityResults",
145
+ "DeltaSD",
146
+ "DeltaRM",
147
+ "DeltaSDRM",
148
+ "compute_honest_did",
149
+ "sensitivity_plot",
150
+ # Power analysis
151
+ "PowerAnalysis",
152
+ "PowerResults",
153
+ "SimulationPowerResults",
154
+ "compute_mde",
155
+ "compute_power",
156
+ "compute_sample_size",
157
+ "simulate_power",
158
+ "plot_power_curve",
102
159
  ]