nrddgp: Data generating process for nonlinear RDD
Description
Generates a sample of observations based on RDD with a continuous treatment variable and a possibly nonlinear and nonseparable structural function.
Usage
nrddgp(
n,
rho_R = 0.3,
rho_U = 0.3,
gamma_star = c(1, 1, 1),
Nonseparable = TRUE
)
Value
Data frame whose columns are outcome Y, treatment Treat, and running variable R, respectively.
Arguments
- n
Sample size.
- rho_R
Correlation between R and epsilon.
- rho_U
Correlation between U and epsilon.
- gamma_star
true parameter value for the parameter in the structural function.
- Nonseparable
Whether the structural function should be estimated as a separable or nonseparable function of the treatment. The default is TRUE.
Examples
Run this coden <- 500
set.seed(123)
data <- nrddgp(n)
Run the code above in your browser using DataLab