IQSS / Zelig

A statistical framework that serves as a common interface to a large range of models

Home Page:http://zeligproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ATT doesn't report SE or CI

christophergandrud opened this issue · comments

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?"

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