Skip to content

Commit 8184a9f

Browse files
committed
iv
1 parent f6353c8 commit 8184a9f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

vignettes/binary_iv.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ iv_defiers <- binary_iv_designer(type_probs = c(0,0,.8,.2))
9292
# Violates monotonicity with heterogeneous treatment effects
9393
iv_het <- binary_iv_designer(type_probs = c(0,0,.8,.2),
9494
b = c(0.5, 0.5, 0.5, 0))
95-
diagnoses <- diagnose_designs(binary_iv_design, iv_nonrelevant, iv_nonrandom,
95+
diagnoses <- diagnose_designs(iv_nonrelevant, iv_nonrandom,
9696
iv_nonexcl, iv_defiers, iv_het, sims = 25)
9797
```
9898

@@ -102,19 +102,19 @@ diagnoses_table <- reshape_diagnosis(diagnoses)
102102

103103
We highlight a few takeaways. Firstly, our estimates are unbiased when all assumption hold. We show that violating any of the first three assumptions yields biased estimates.
104104

105-
```{r, echo=FALSE}
105+
```{r, eval=FALSE}
106106
kable(diagnoses_table[
107-
diagnoses_table$`Estimand Label` %in% c("late", "ate") &
108-
diagnoses_table$`Design Label` %in% c("binary_iv_design","iv_nonrelevant",
107+
diagnoses_table$`Inquiry` %in% c("late", "ate") &
108+
diagnoses_table$`Design` %in% c("binary_iv_design","iv_nonrelevant",
109109
"iv_nonrandom", "iv_nonexcl"),
110-
c(1:3, 6, 8,14)], digits = 2)
110+
c(1:3, 6, 8, 14)], digits = 2)
111111
```
112112

113113
In the absence of the monotonicity assumption, our IV estimates are less biased for the LATE than the ATE estimand in the presence of heterogeneous treatment effects. Moreover, in these cases, the IV is best at estimating the weighted average of treatment effects for compliers and defiers ($LATE_{het}$).
114114

115-
```{r, echo=FALSE}
116-
kable(diagnoses_table[diagnoses_table$`Estimand Label` %in% c("ate", "late", "late_het") &
117-
diagnoses_table$`Design Label` %in% c("iv_defiers", "iv_het") &
115+
```{r, eval=FALSE}
116+
kable(diagnoses_table[diagnoses_table$`Inquiry` %in% c("ate", "late", "late_het") &
117+
diagnoses_table$`Design` %in% c("iv_defiers", "iv_het") &
118118
diagnoses_table$Bias!= "NA",c(1:3, 6, 8,14)], digits = 2)
119119
```
120120

0 commit comments

Comments
 (0)