Skip to content

kolesarm/ShiftShareSE

Repository files navigation

R-CMD-check Coverage status CRAN_Status_Badge Download statistics

ShiftShareSE

This R package implements confidence intervals in shift-share designs (also called Bartik (1991) designs) using the AKM and AKM0 procedures from Adão, Kolesár, and Morales (2019). The released version is available at CRAN. See the ShiftShareSEMatlab package for Matlab version of this code, and the ShiftShareSEStata package for a Stata version.

See vignette ShiftShareSE for description of the package (available through vignette("ShiftShareSE") once package is installed), and the package manual for documentation of the package functions.

Example

IV regression using data from Autor, Dorn, and Hanson (2013), included in the package as ADH:

ivreg_ss(d_sh_empl ~ 1 | shock, X=IV, data=ADH$reg, W=ADH$W,
         method=c("ehw", "akm", "akm0"))

Corresponding reduced-form and first-stage regressions:

reg_ss(d_sh_empl ~ 1, X=IV, data=ADH$reg, W=ADH$W,
       method=c("ehw", "akm", "akm0"))
reg_ss(shock ~ 1, X=IV, data=ADH$reg, W=ADH$W,
       method=c("ehw", "akm", "akm0"))

Installation

You can install the released version of ShiftShareSE from CRAN with:

install.packages("ShiftShareSE")

Alternatively, you can get the current development version from GitHub:

if (!requireNamespace("remotes")) {
  install.packages("remotes")
}
remotes::install_github("kolesarm/Robust-Small-Sample-Standard-Errors")