# Create a regression discontinuity design

Source:`R/regression_discontinuity_designer.R`

`regression_discontinuity_designer.Rd`

Builds a design with sample from population of size `N`

. The average treatment effect local to the cutpoint is equal to `tau`

. It allows for specification of the order of the polynomial regression (`poly_reg_order`

), cutoff value on the running variable (`cutoff`

), and size of bandwidth around the cutoff (`bandwidth`

). By providing a vector of numbers to `control_coefs`

and `treatment_coefs`

, users can also specify polynomial regression coefficients that generate the expected control and treatment potential outcomes given the running variable.

## Arguments

- N
An integer. Size of population to sample from.

- tau
A number. Difference in potential outcomes functions at the threshold.

- outcome_sd
A positive number. The standard deviation of the outcome.

- cutoff
A number in (0,1). Threshold on running variable beyond which units are treated.

- bandwidth
A number. The value of the bandwidth on both sides of the threshold from which to include units.

- control_coefs
A vector of numbers. Coefficients for polynomial regression function that generates control potential outcomes. Order of polynomial is equal to length.

- treatment_coefs
A vector of numbers. Coefficients for polynomial regression function that generates treatment potential outcomes. Order of polynomial is equal to length.

- poly_reg_order
Integer greater than or equal to 1. Order of the polynomial regression used to estimate the jump at the cutoff.

- args_to_fix
A character vector. Names of arguments to be args_to_fix in design.

## Details

See vignette online.