RDData: Class Constructor for RDData

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Convert data to standardized format for use with low-level functions. If the cutoff for treatment is non-zero, shift the running variable so that cutoff is at zero.

Usage

1
RDData(d, cutoff)

Arguments

d

data frame with first column corresponding to outcome variable, second column corresponding to running variable and optionally a column called "(sigma2)" that corresponds to the conditional variance of the outcome (or an estimate of the conditional variance)

cutoff

specifies the RD cutoff in the running variable.

Value

An object of class "RDData", which is a list containing the following components:

Ym

Outcome vector for observations below cutoff

Yp

Outcome vector for observationsabove cutoff

Xm

Running variable for observations below cutoff

Xp

Running variable for observationsabove cutoff

sigma2m

Conditional variance of outcome for observations below cutoff

sigma2p

Conditional variance of outcome for observations above cutoff

orig.cutoff

Original cutoff

itemvar.namesNames of outcome and running variable in supplied data frame

Examples

1
2
## Transform Lee data
d <- RDData(lee08, cutoff=0)

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