Skip to content

Commit 0eb5b07

Browse files
committed
smallest->largest
1 parent d41793a commit 0eb5b07

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

fastrerandomize/R/FRR_Diagnostics.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' Implements the calculations in Theorem 1 and Appendix D of the paper involving:
44
#' (1) Realized RMSE from an observed Mahalanobis distance M (or SMDs);
55
#' (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|).
77
#'
88
#' @param smd Optional numeric vector of standardized mean differences; if supplied,
99
#' M is computed as sum(smd^2), and d = length(smd).
@@ -17,7 +17,7 @@
1717
#' Must lie in [0,1). If `NULL`, RMSEs that require R^2 are returned as NA, but the
1818
#' "per-sigma" formulas that do not need R^2 are still shown when possible.
1919
#' @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.
2121
#' @param tau Optional effect size |tau| (same units as Y) to back out an RMSE goal
2222
#' via a normal approximation to power.
2323
#' @param alpha Size of a two-sided test (default 0.05).
@@ -353,7 +353,7 @@ if(FALSE){
353353
out$realized$rmse # plug-in realized RMSE (if sigma & R2 supplied)
354354
out$realized$rmse_upper # conservative upper bound
355355

356-
# Power planning: smallest q that achieves 1-β power at size α for |τ|
356+
# Power planning: largest q that achieves 1-β power at size α for |τ|
357357
plan <- diagnose_rerandomization(
358358
smd = observed_smds,
359359
n_T = n_treated, n_C = n_control,

0 commit comments

Comments
 (0)