RDHonestBME: Honest CIs in sharp RD with discrete regressors under BME...

View source: R/RD_bme.R

RDHonestBMER Documentation

Honest CIs in sharp RD with discrete regressors under BME function class

Description

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.

Usage

RDHonestBME(
  formula,
  data,
  subset,
  cutoff = 0,
  na.action,
  h = Inf,
  alpha = 0.05,
  order = 0,
  regformula
)

Arguments

formula

object of class "formula" (or one that can be coerced to that class) of the form outcome ~ running_variable

data

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.

subset

optional vector specifying a subset of observations to be used in the fitting process.

cutoff

specifies the RD cutoff in the running variable.

na.action

function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options (usually na.omit). Another possible value is na.fail

h

bandwidth, a scalar parameter.

alpha

determines confidence level, 1-\alpha

order

Order of local regression 1 for linear, 2 for quadratic, etc.

regformula

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+2th element of the design matrix

Value

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 NAs.

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

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1257/aer.20160945")}

Examples

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)")

kolesarm/RDHonest documentation built on April 14, 2024, 3:27 a.m.