Closed christophergandrud closed 7 years ago
att
+ get_qi
returns a vector of the simulated values for this quantity of interest.
For example,
library(zeligverse)
library(dplyr) # load %>% pipe operator
# load data and estimate model
data(sanction)
zqi.out <- zelig(num ~ target + coop + mil,
model = "poisson", data = sanction, cite = FALSE)
# find the ATT where the treatement is mil = 1
z.att <- zqi.out %>%
ATT(treatment = "mil", treat = 1) %>%
get_qi(qi = "ATT", xvalue = "TE")
head(z.att)
## -8.822828 -7.374883 -7.343523 -6.713210 -7.026924 -7.185858
When you run summary
on this, the normal base-R summary
returns its normal summary statistics (e.g. IQR).
You can find other summary statistics using the standard methods for a vector of values. For example, standard error of the mean:
sd(z.att) / sqrt(length(z.att))
## 0.02020344
From Eric Meng via email:
"I estimate ATT through the command “ATT”... However, it only yields estimates of mean, median, and IQR without SE or 95%CI. Is there a way to deal with that?"