The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The {fetwfe}
package implements fused extended
two-way fixed effects (FETWFE), a methodology for estimating
treatment effects in difference-in-differences with staggered
adoptions.
To install the {fetwfe}
package, simply use
install.packages("fetwfe")
You can also install the latest development version by using
# install.packages("remotes") # if needed
::install_github("gregfaletto/fetwfePackage") remotes
The primary function in the {fetwfe}
is
fetwfe()
, which implements fused extended two-way fixed
effects. Here’s some example code that implements the data application
from the paper:
library(fetwfe)
library(bacondecomp)
set.seed(23451)
data(divorce)
<- fetwfe(
res pdata=divorce[divorce$sex == 2, ],
time_var="year",
unit_var="st",
treatment="changed",
covs=c("murderrate", "lnpersinc", "afdcrolls"),
response="suiciderate_elast_jag",
q=0.5,
verbose=TRUE)
summary(res)
For a vignette and full documentation, check out the page for the
{fetwfe}
package on CRAN.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.