predict.rd | R Documentation |
predict.rd
makes predictions of means and standard deviations of RDs at different cutoffs.
## S3 method for class 'rd'
predict(object, gran = 50, ...)
object |
An |
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 |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.