From 53006761f91b10b318a0796ab5e74494a85add1a Mon Sep 17 00:00:00 2001 From: Heming Zhen Date: Wed, 7 May 2025 12:20:46 -0600 Subject: [PATCH] Update rm.combo.WLRmax.R retrieving first min index from p.unadjusted --- R/rm.combo.WLRmax.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/rm.combo.WLRmax.R b/R/rm.combo.WLRmax.R index c6d0b3e..b3c7efe 100644 --- a/R/rm.combo.WLRmax.R +++ b/R/rm.combo.WLRmax.R @@ -83,7 +83,7 @@ rm.combo.WLRmax<- function(time = NULL, pval.adjusted <- p.adjust(p.unadjusted, method = adjust.methods) pval <- min(pval.adjusted) - max.index <- which(p.unadjusted == min(p.unadjusted), arr.ind = TRUE) + max.index <- which.min(p.unadjusted) } @@ -170,7 +170,7 @@ rm.combo.WLRmax<- function(time = NULL, algorithm= GenzBretz(maxpts=50000,abseps=0.00001))[1]} p.unadjusted <- stats::pnorm(q=tst.rslt1$Z) - max.index <- which(p.unadjusted == min(p.unadjusted), arr.ind = TRUE) + max.index <- which.min(p.unadjusted) #max.index <- which(abs(Z.tst.rslt1) == max(abs(Z.tst.rslt1)), arr.ind = TRUE) } @@ -347,4 +347,4 @@ rm.combo.WLRmax<- function(time = NULL, return(out) -} \ No newline at end of file +}