You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: education/causal_iv_one-sided/case_study_02_IV_one-sided.qmd
+24-11Lines changed: 24 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -296,17 +296,17 @@ Note that the likelihood function is expressed as an increment to the log probab
296
296
For the set $\mathcal{S}(0, 0)$, the built-in function in Stan, `log_mix()`, is employed to define mixtures on the log scale. The `log_mix(p, a, b)` function internally calculates the log-weighted mixture of `a` and `b` using the weight `p`, which provides a more numerically stable solution for mixtures (see [Chapter 5 of the Stan User's Guide](https://mc-stan.org/docs/stan-users-guide/vectorizing-mixtures.html)). By adopting this function, we directly determine the log-likelihood contributions for units in the subset $\mathcal{S}(0, 0)$, which originate from a mixture of outcome distributions for two compliance types: compliers and never-takers.
297
297
298
298
299
-
#### Transformed Parameters Block
299
+
#### Generated quantities Block
300
300
301
301
```stan
302
-
transformed parameters {
302
+
generated quantities {
303
303
// Superpopulation complier average causal effect (CACE)
304
304
// in per-1000 units
305
305
real CACE = (eta_c1 - eta_c0) * 10^3;
306
306
}
307
307
```
308
308
309
-
The estimand of primary interest is the super-population complier average causal effect (CACE), denoted as $\eta_{c1}-\eta_{c0}$. We can include an optional transformed parameters block to generate the posterior distribution for the CACE, which is defined as a function of the declared parameters. We rescaled the CACE estimates by simply multiplying the original estimates by $10^{3}$. The resulting CACE estimate represents the causal effect of vitamin A supplements on infant mortality per 1,000 individuals, specifically for compliers in the population.
309
+
The estimand of primary interest is the super-population complier average causal effect (CACE), denoted as $\eta_{c1}-\eta_{c0}$. We can include an optional `generated quantities` block to generate the posterior distribution for the CACE, which is defined as a function of the declared parameters. We rescaled the CACE estimates by simply multiplying the original estimates by $10^{3}$. The resulting CACE estimate represents the causal effect of vitamin A supplements on infant mortality per 1,000 individuals, specifically for compliers in the population.
This histogram replicates Figure 3 from @imbens1997bayesian. Under the exclusion restriction for never-takers, the posterior mean of the CACE is 3.23. The 90% credible interval spans from 1.40 to 5.13 per 1,000 individuals, while the 99% credible interval ranges from 0.38 to 6.38. These findings suggest that vitamin A treatment is likely to confer a positive effect on infant survival among compliers in the studied population.
This histogram replicates Figure 3 from @imbens1997bayesian. Under the exclusion restriction for never-takers, the posterior mean of the CACE is `r CACE_mean`. The 90% credible interval spans from `r CACE_CI_90[1]` to `r CACE_CI_90[1]` per 1,000 individuals, while the 99% credible interval ranges from `r CACE_CI_99[1]` to `r CACE_CI_90[2]`. These findings suggest that vitamin A treatment is likely to confer a positive effect on infant survival among compliers in the studied population.
373
381
374
382
In practical terms, given a CACE of 3.23, it means that for every 1,000 complier infants, about an additional 3.23 infants are expected to survive due to the vitamin A treatment, compared to their counterparts who did not receive the intervention. To fully grasp the practical significance of the CACE, one must consider other relevant data, the overarching landscape of infant health, and any potential disadvantages or expenses related to the treatment. For instance, in regions grappling with high infant mortality rates, even marginal improvements in survival rates might carry substantial importance. The cost-effectiveness and safety profile of the vitamin A treatment further accentuate its potential benefits, especially if it is both affordable and exhibits minimal side effects.
375
383
@@ -435,10 +443,10 @@ model {
435
443
}
436
444
```
437
445
438
-
In addition to the main causal estimand, the super-population complier average causal effect (CACE, $\eta_{c1} - \eta_{c0}$), we can now define the super-population average causal effect of treatment assignment on outcomes for never-takers ($\eta_{n1} - \eta_{n0}$) in the `transformed parameters` block. We will refer to this as the "NACE" (Never-taker Average Causal Effect):
446
+
In addition to the main causal estimand, the super-population complier average causal effect (CACE, $\eta_{c1} - \eta_{c0}$), we can now define the super-population average causal effect of treatment assignment on outcomes for never-takers ($\eta_{n1} - \eta_{n0}$) in the `generated quantities` block. We will refer to this as the "NACE" (Never-taker Average Causal Effect):
The histogram above replicates Figure 1 from @imbens1997bayesian. The 90% credible interval of the posterior distribution indicates that the true CACE, without exclusion restriction, likely falls within the range of -0.37 to 6.11 per 1,000 individuals.
520
+
The histogram above replicates Figure 1 from @imbens1997bayesian. The 90% credible interval of the posterior distribution indicates that the true CACE, without exclusion restriction, likely falls within the range of `r CACE_CI_90[1]`to `r CACE_CI_90[2]` per 1,000 individuals.
We also replicate Figure 2 from @imbens1997bayesian, which represents the posterior distribution for NACE. Under the exclusion restriction, the NACE is constrained to be 0 because $\eta_{n0} = \eta_{n1}$. Without the exclusion restriction, however, the NACE has a posterior distribution that is centered around 0, lending credibility to the exclusion restriction [@imbens1997bayesian].
0 commit comments