reg_ss.fit {ShiftShareSE} | R Documentation |
Inference in a shift-share regression
Description
Basic computing engine to calculate confidence intervals and p-values in
shift-share designs using different inference methods, as specified by
method
.
Usage
reg_ss.fit(
y,
X,
W,
Z,
w = NULL,
method = c("akm", "akm0"),
beta0 = 0,
alpha = 0.05,
region_cvar = NULL,
sector_cvar = NULL
)
Arguments
y |
Outcome variable, vector of length |
X |
Shift-share vector with length |
W |
A matrix of sector shares, so that |
Z |
Matrix of regional controls, matrix with |
w |
vector of weights (length |
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