rddapp (version 1.1.0)

predict.rd: Prediction the Regression Discontinuity

Description

predict.rd makes predictions of mean and standard deviation 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

Granularity of the data points.

...

Additional arguments affecting the predictions produced.

Examples

Run this code
# NOT RUN {
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 DataCamp Workspace