Computes honest CIs for local polynomial regression with uniform kernel in sharp RD under the assumption that the conditional mean lies in the bounded misspecification error (BME) class of functions, as considered in Kolesár and Rothe (2018). This class formalizes the notion that the fit of the chosen model is no worse at the cutoff than elsewhere in the estimation window.
RDHonestBME(
formula,
data,
subset,
cutoff = 0,
na.action,
h = Inf,
alpha = 0.05,
order = 0,
regformula
)
An object of class "RDResults"
. This is a list with at least
the following elements:
"coefficients"
Data frame containing estimation results, including point estimate, one- and two-sided confidence intervals, a bound on worst-case bias, bandwidth used, and the number of effective observations.
"call"
The matched call.
"lm"
An "lm"
object containing the fitted
regression.
"na.action"
(If relevant) information on the special
handling of NA
s.
object of class "formula"
(or one that can be coerced
to that class) of the form outcome ~ running_variable
optional data frame, list or environment (or object coercible by
as.data.frame
to a data frame) containing the outcome and running
variables in the model. If not found in data
, the variables are
taken from environment(formula)
, typically the environment from
which the function is called.
optional vector specifying a subset of observations to be used in the fitting process.
specifies the RD cutoff in the running variable.
function which indicates what should happen when the data
contain NA
s. The default is set by the na.action
setting of
options
(usually na.omit
). Another possible value is
na.fail
bandwidth, a scalar parameter.
determines confidence level, \(1-\alpha\)
Order of local regression 1
for linear, 2
for
quadratic, etc.
Explicitly specify regression formula to use instead of
running a local polynomial regression, with y
and x
denoting the outcome and the running variable, and cutoff is normalized
to 0
. Local linear regression (order = 1
) is equivalent to
regformula = "y~x*I(x>0)"
. Inference is done on the
order+2
th element of the design matrix
Michal Kolesár and Christoph Rothe. Inference in regression discontinuity designs with a discrete running variable. American Economic Review, 108(8):2277—-2304, August 2018. tools:::Rd_expr_doi("10.1257/aer.20160945")
RDHonestBME(log(earnings)~yearat14, data=cghs, h=3,
order=1, cutoff=1947)
## Equivalent to
RDHonestBME(log(earnings)~yearat14, data=cghs, h=3,
cutoff=1947, order=1, regformula="y~x*I(x>=0)")
Run the code above in your browser using DataLab