calc_power | R Documentation |
Calculate power for detecting cross site variation with a ratio test. This uses work and results in Appendix A of Bloom and Spybrook.
calc_power(J, n.bar, tau, p.tx = 0.5, ICC = 0.5, K = 0, R2.X = 0, alpha = 0.05)
J |
Number of sites |
n.bar |
average people per site |
tau |
Cross site VARIANCE of site-level ATEs. |
p.tx |
proportion treated, Default: 0.5 |
ICC |
Control-side ICC, Default: 0.5 |
K |
Number of individual covariates used to explain control-side variation, Default: 0 |
R2.X |
Explanatory power of these individual level covariates, Default: 0 |
alpha |
Significance level, Default: 0.05 |
Power
# Example in the text
calc_power( 80, 60, 0.02, p.tx=0.6, ICC=0.2, K = 0, R2.X=0.25 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.