rddapp (version 1.3.2)

predict.rd: Predict the Regression Discontinuity

Description

predict.rd makes predictions of means and standard deviations of RDs at different cutoffs.

Usage

# S3 method for rd
predict(object, gran = 50, ...)

Arguments

object

An rd object, typically the result of rd_est.

gran

A non-negative integer specifying the granularity of the data points (i.e. the desired number of predicted points). The default is 50.

...

Additional arguments passed to predict.

Examples

Run this code
set.seed(12345)
x <- runif(1000, -1, 1)
cov <- rnorm(1000)
y <- 3 + 2 * x + 3 * cov + 10 * (x >= 0) + rnorm(1000)
tr <- as.integer(x >= 0)
rd <- rd_est(y ~ x + tr | cov, cutpoint = 0, t.design = "geq") 
predict(rd)

Run the code above in your browser using DataLab