RDHonestBME: BME method to compute honest CIs in RD designs with discrete...

Description Usage Arguments Note Examples

View source: R/RD_bme.R

Description

Computes honest CIs for local linear regression with uniform kernel as in Kolesar and Rothe

Usage

1
2
RDHonestBME(formula, data, subset, cutoff = 0, na.action, hp = Inf,
  hm = hp, 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).

hp, hm

bandwidth for treated (units with positive running variable), and control (units with negative running variable) units. If hm is not supplied, it is assumed to equal to hp. If neither bandwidth is supplied, optimal bandwidth is computed according to criterion given by opt.criterion.

alpha

determines confidence level, 1-alpha

order

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

regformula

Explicitly specify regression formula as alternative to local linear 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 the order+2th element of the design matrix

Note

subset is evaluated in the same way as variables in formula, that is first in data and then in the environment of formula.

Examples

1
2
3
4
5
RDHonestBME(log(cghs$earnings)~yearat14, data=cghs, hp=3,
            order=1, cutoff=1947)
## Equivalent to
RDHonestBME(log(cghs$earnings)~yearat14, data=cghs, hp=3,
            cutoff=1947, order=1, regformula="y~x*I(x>=0)")

kolesarm/RDHonest documentation built on April 3, 2018, 11:08 a.m.