Description Usage Arguments Value Author(s) References Examples

`rdpower()`

performs power calculations for RD designs.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ```
rdpower(
data = NULL,
cutoff = 0,
tau = NULL,
alpha = 0.05,
nsamples = NULL,
sampsi = NULL,
samph = NULL,
all = FALSE,
bias = NULL,
variance = NULL,
plot = FALSE,
graph.range = NULL,
covs = NULL,
covs_drop = TRUE,
deriv = 0,
p = 1,
q = NULL,
h = NULL,
b = NULL,
rho = NULL,
kernel = "triangular",
bwselect = "mserd",
vce = "nn",
cluster = NULL,
scalepar = 1,
scaleregul = 1,
fuzzy = NULL,
level = 95,
weights = NULL,
masspoints = "adjust",
bwcheck = NULL,
bwrestrict = TRUE,
stdvars = FALSE
)
``` |

`data` |
a matrix (Y,R) containing the outcome variable and the running variable (as column vectors). |

`cutoff` |
the RD cutoff (default is 0). |

`tau` |
specifies the treatment effect under the alternative at which the power function is evaluated. The default is half the standard deviation of the outcome for the untreated group. |

`alpha` |
specifies the significance level for the power function. Default is 0.05. |

`nsamples` |
sets the total sample size to the left, sample size to the left inside the bandwidth, total sample size to the right and sample size to the right of the cutoff inside the bandwidth to calculate the variance when the running variable is not specified. When not specified, the values are calculated using the running variable. |

`sampsi` |
sets the sample size at each side of the cutoff for power calculation. The first number is the sample size to the left of the cutoff and the second number is the sample size to the right. Default values are the sample sizes inside the chosen bandwidth. |

`samph` |
sets the bandwidths at each side of the cutoff for power calculation. The first number is the bandwidth to the left of the cutoff and the second number is the bandwidth to the right. Default values are the bandwidths used by |

`all` |
displays the power using the conventional variance estimator, in addition to the robust bias corrected one. |

`bias` |
set bias to the left and right of the cutoff. If not specified, the biases are estimated using |

`variance` |
set variance to the left and right of the cutoff. If not specified, the variances are estimated using |

`plot` |
plots the power function using the conventional and robust bias corrected standard errors from |

`graph.range` |
range of the plot. |

`covs` |
option for |

`covs_drop` |
option for |

`deriv` |
option for |

`p` |
option for |

`q` |
option for |

`h` |
option for |

`b` |
option for |

`rho` |
option for |

`kernel` |
option for |

`bwselect` |
option for |

`vce` |
option for |

`cluster` |
option for |

`scalepar` |
option for |

`scaleregul` |
option for |

`fuzzy` |
option for |

`level` |
option for |

`weights` |
option for |

`masspoints` |
option for |

`bwcheck` |
option for |

`bwrestrict` |
option for |

`stdvars` |
option for |

`power.rbc` |
power against tau using robust bias corrected standard error |

`se.rbc` |
robust bias corrected standard error |

`sampsi.r` |
number of observations inside the window to the right of the cutoff |

`sampsi.l` |
number of observations inside the window to the left of the cutoff |

`samph.r` |
bandwidth to the right of the cutoff |

`samph.l` |
bandwidth to the left of the cutoff |

`alpha` |
significance level used in power function |

`tau` |
treatment effect under alternative hypothesis |

`bias.r` |
bias to the right of the cutoff |

`bias.l` |
bias to the left of the cutoff |

`Vr.rb` |
Robust bias corrected variance to the right of the cutoff |

`Vl.rb` |
Robust bias corrected variance to the left of the cutoff |

`N.r` |
Total sample size to the right of the cutoff |

`N.l` |
Total sample size to the left of the cutoff |

`power.conv` |
power against tau using conventional inference |

`se.conv` |
conventional standard error |

Matias Cattaneo, Princeton University. cattaneo@princeton.edu

Rocio Titiunik, Princeton University. titiunik@princeton.edu

Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquez@econ.ucsb.edu

M.D. Cattaneo, R. Titiunik and G. Vazquez-Bare. (2019). Power Calculations for Regression Discontinuity Designs. *Stata Journal*, 19(1): 210-245.

1 2 3 4 5 6 7 8 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.