|
3 | 3 | #' Implements the calculations in Theorem 1 and Appendix D of the paper involving: |
4 | 4 | #' (1) Realized RMSE from an observed Mahalanobis distance M (or SMDs); |
5 | 5 | #' (2) Ex-ante RMSE when accepting assignments with M <= a (equivalently, with acceptance probability q under complete randomization); |
6 | | -#' (3) Smallest acceptance probability q that attains a user-specified precision goal,provided via an RMSE target or via a power target (alpha, 1-beta, |tau|). |
| 6 | +#' (3) largest acceptance probability q that attains a user-specified precision goal,provided via an RMSE target or via a power target (alpha, 1-beta, |tau|). |
7 | 7 | #' |
8 | 8 | #' @param smd Optional numeric vector of standardized mean differences; if supplied, |
9 | 9 | #' M is computed as sum(smd^2), and d = length(smd). |
|
17 | 17 | #' Must lie in [0,1). If `NULL`, RMSEs that require R^2 are returned as NA, but the |
18 | 18 | #' "per-sigma" formulas that do not need R^2 are still shown when possible. |
19 | 19 | #' @param rmse_goal Optional numeric target for RMSE (same units as Y). If supplied |
20 | | -#' (with sigma and R2), the smallest q achieving this ex-ante goal is returned. |
| 20 | +#' (with sigma and R2), the largest q achieving this ex-ante goal is returned. |
21 | 21 | #' @param tau Optional effect size |tau| (same units as Y) to back out an RMSE goal |
22 | 22 | #' via a normal approximation to power. |
23 | 23 | #' @param alpha Size of a two-sided test (default 0.05). |
@@ -353,7 +353,7 @@ if(FALSE){ |
353 | 353 | out$realized$rmse # plug-in realized RMSE (if sigma & R2 supplied) |
354 | 354 | out$realized$rmse_upper # conservative upper bound |
355 | 355 |
|
356 | | - # Power planning: smallest q that achieves 1-β power at size α for |τ| |
| 356 | + # Power planning: largest q that achieves 1-β power at size α for |τ| |
357 | 357 | plan <- diagnose_rerandomization( |
358 | 358 | smd = observed_smds, |
359 | 359 | n_T = n_treated, n_C = n_control, |
|
0 commit comments