Nothing
# Bootrstapped TWFE Difference-in-Differences with panel data
# 2 periods and 2 groups
wboot.twfe.panel <- function(nn, n, y, dd, post, x, i.weights){
#-----------------------------------------------------------------------------
v <- stats::rexp(n)
#v <- v / mean(v)
v <- as.matrix(c(v, v))
#weights for the bootstrap
b.weights <- as.vector(i.weights * v)
#Compute the TWFE Regression
reg.b <- stats::lm(y ~ dd:post + post + dd + x, weights = b.weights)
twfe.att.b <- reg.b$coefficients["dd:post"]
#-----------------------------------------------------------------------------
return(twfe.att.b)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.