ivreg_ss {ShiftShareSE} | R Documentation |
Inference in an IV regression with a shift-share instrument
Description
Computes confidence intervals and p-values in an instrumental variables
regression in which the instrument has a shift-share structure, as in Bartik
(1991). Several different inference methods can computed, as specified by
method
.
Usage
ivreg_ss(
formula,
X,
data,
W,
subset,
weights,
method,
beta0 = 0,
alpha = 0.05,
region_cvar = NULL,
sector_cvar = NULL
)
Arguments
formula |
An object of class |
X |
Shift-share vector with length |
data |
An optional data frame, list or environment (or object coercible
by |
W |
A matrix of sector shares, so that |
subset |
An optional vector specifying a subset of observations to be used in the fitting process. |
weights |
An optional vector of weights to be used in the fitting
process. Should be |
method |
Vector specifying which inference methods to use. The vector elements have to be one or more of the following strings:
|
beta0 |
null that is tested (only affects reported p-values) |
alpha |
Determines confidence level of reported confidence intervals,
which will have coverage |
region_cvar |
A vector with length |
sector_cvar |
A vector with length |
Value
Returns an object of class "SSResults"
containing the
estimation and inference results. The print
function can be used
to print a summary of the results. The object is a list with at least the
following components:
- beta
Point estimate of the effect of interest
\beta
- se, p
A vector of standard errors and a vector of p-values of the null
H_{0}\colon \beta = \beta_{0}
for the inference methods inmethod
, with\beta_{0}
specified by the argumentbeta0
. For the method"akm0"
, the standard error corresponds to the effective standard error (length of the confidence interval divided by2*stats::qnorm(1-alpha/2)
)- ci.l, ci.r
Upper and lower endpoints of the confidence interval for the effect of interest
\beta
, for each of the methods inmethod
Note
subset
is evaluated in the same way as variables in
formula
, that is first in data
and then in the environment
of formula
.
References
Bartik, Timothy J., Who Benefits from State and Local Economic Development Policies?, Kalamazoo, MI: W.E. Upjohn Institute for Employment Research, 1991.
Adão, Rodrigo, Kolesár, Michal, and Morales, Eduardo, "Shift-Share Designs: Theory and Inference", Quarterly Journal of Economics 2019, 134 (4), 1949-2010. doi: 10.1093/qje/qjz025.
Examples
## Use ADH data from Autor, Dorn, and Hanson (2013)
ivreg_ss(d_sh_empl ~ 1 | shock, X=IV, data=ADH$reg, W=ADH$W,
method=c("ehw", "akm", "akm0"))