nrddgp: Data generating process for nonlinear RDD

View source: R/nrddgp.R

nrddgpR Documentation

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
)

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.

Value

Data frame whose columns are outcome Y, treatment Treat, and running variable R, respectively.

Examples

n <- 500
set.seed(123)
data <- nrddgp(n)

NonlinearRDD documentation built on Nov. 26, 2023, 5:07 p.m.