Skip to content

Commit 74d90d5

Browse files
committed
fix preprocessing
1 parent 68f8009 commit 74d90d5

5 files changed

Lines changed: 2 additions & 18 deletions

File tree

-2.16 KB
Loading
-9.23 KB
Loading
-3.03 KB
Loading
-3.46 KB
Loading

docs/source/tutorials/oregon.rst

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Emergency Department Cost Analysis
123123
ml_local_estimator.fit(X, Z, D, Y_ED_CHARG_TOT_ED, strata)
124124
125125
# Define evaluation points for emergency department costs
126-
outcome_ed_costs_locations = np.linspace(Y_ED_CHARG_TOT_ED.min(), Y_ED_CHARG_TOT_ED.max(), 100)
126+
outcome_ed_costs_locations = np.arange(Y_ED_CHARG_TOT_ED.min(), Y_ED_CHARG_TOT_ED.max(), 3000)
127127
128128
Local Distribution Treatment Effects: Medicaid Assignment vs Control
129129
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -288,8 +288,6 @@ The side-by-side bar charts show probability treatment effects across different
288288

289289
**Policy Implications**: Understanding these distributional effects is crucial for healthcare policy. The local analysis reveals that Medicaid's impact varies across the cost distribution for those who actually enroll when assigned, which has important implications for healthcare budgeting and understanding the true effects of public health insurance programs on compliers.
290290

291-
**Conclusion**: Using the real Oregon Health Insurance Experiment dataset with 24,000 participants, the local distributional analysis reveals nuanced patterns in how Medicaid assignment affects healthcare utilization among compliers. The analysis accounts for non-compliance and goes beyond simple average comparisons to show how treatment effects vary across the entire emergency department cost distribution, providing insights into how public health insurance impacts different segments of the population who actually enroll. This demonstrates the power of local distribution treatment effect analysis for understanding heterogeneous responses in healthcare policy interventions with non-compliance.
292-
293291
Emergency Department Visits Analysis
294292
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
295293

@@ -310,20 +308,13 @@ Now let's examine how Medicaid enrollment affects the distribution of emergency
310308
ml_local_estimator.fit(X, Z, D, Y_NUM_VISIT_CENS_ED, strata)
311309
312310
# Define evaluation points for emergency department visits
313-
outcome_ed_visits_locations = np.linspace(Y_NUM_VISIT_CENS_ED.min(), Y_NUM_VISIT_CENS_ED.max(), 20)
311+
outcome_ed_visits_locations = np.arange(Y_NUM_VISIT_CENS_ED.min(), Y_NUM_VISIT_CENS_ED.max(), 1)
314312
315313
Distribution Treatment Effects: Visits Analysis
316314
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
317315

318316
.. code-block:: python
319317
320-
# Compute LDTE: Treatment vs Control
321-
ldte_ctrl, lower_ctrl, upper_ctrl = simple_local_estimator.predict_ldte(
322-
target_treatment_arm=1, # Z=1 Selected for treatment (Enrolled)
323-
control_treatment_arm=0, # Z=0 Not selected for treatment (Not enrolled)
324-
locations=outcome_ed_visits_locations
325-
)
326-
327318
# LDTE: Treatment vs Control
328319
ldte_simple, lower_simple, upper_simple = simple_local_estimator.predict_ldte(
329320
target_treatment_arm=1, # Z=1 Selected for treatment (Enrolled)
@@ -365,13 +356,6 @@ Probability Treatment Effects: Visits Analysis
365356

366357
.. code-block:: python
367358
368-
# Compute LPTE: Treatment vs Control
369-
lpte_ctrl, lpte_lower_ctrl, lpte_upper_ctrl = simple_local_estimator.predict_lpte(
370-
target_treatment_arm=1, # Z=1 Selected for treatment (Enrolled)
371-
control_treatment_arm=0, # Z=0 Not selected for treatment (Not enrolled)
372-
locations=[-1] + outcome_ed_visits_locations
373-
)
374-
375359
# Compute Local Probability Treatment Effects
376360
lpte_simple, lpte_lower_simple, lpte_upper_simple = simple_local_estimator.predict_lpte(
377361
target_treatment_arm=1, # Z=1 Selected for treatment (Enrolled)

0 commit comments

Comments
 (0)