File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -234,16 +234,16 @@ def _bayesian_plot(
234
234
f"treated_unit '{ treated_unit } ' not found. Available units: { self .treated_units } "
235
235
)
236
236
237
- pre_pred_plot = self .pre_pred ["posterior_predictive" ].mu .sel (
237
+ pre_pred = self .pre_pred ["posterior_predictive" ].mu .sel (
238
238
treated_units = treated_unit
239
239
)
240
- post_pred_plot = self .post_pred ["posterior_predictive" ].mu .sel (
240
+ post_pred = self .post_pred ["posterior_predictive" ].mu .sel (
241
241
treated_units = treated_unit
242
242
)
243
243
244
244
h_line , h_patch = plot_xY (
245
245
self .datapre .index ,
246
- pre_pred_plot ,
246
+ pre_pred ,
247
247
ax = ax [0 ],
248
248
plot_hdi_kwargs = {"color" : "C0" },
249
249
)
@@ -263,7 +263,7 @@ def _bayesian_plot(
263
263
# post intervention period
264
264
h_line , h_patch = plot_xY (
265
265
self .datapost .index ,
266
- post_pred_plot ,
266
+ post_pred ,
267
267
ax = ax [0 ],
268
268
plot_hdi_kwargs = {"color" : "C1" },
269
269
)
@@ -278,7 +278,7 @@ def _bayesian_plot(
278
278
# Shaded causal effect for primary treated unit
279
279
h = ax [0 ].fill_between (
280
280
self .datapost .index ,
281
- y1 = post_pred_plot .mean (dim = ["chain" , "draw" ]).values ,
281
+ y1 = post_pred .mean (dim = ["chain" , "draw" ]).values ,
282
282
y2 = self .datapost_treated .sel (treated_units = treated_unit ).values ,
283
283
color = "C0" ,
284
284
alpha = 0.25 ,
You can’t perform that action at this time.
0 commit comments