From ebeb975266c738cf8d636124ec4048aee5bc4719 Mon Sep 17 00:00:00 2001 From: Andreas Busjahn Date: Wed, 17 Jan 2024 17:43:47 +0100 Subject: [PATCH] WINratio rules changed to be inclusive of threshold --- R/tests.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/tests.R b/R/tests.R index ee4e45d..b77bb2f 100644 --- a/R/tests.R +++ b/R/tests.R @@ -1223,18 +1223,18 @@ WINratio <- function(data,groupvar,testvars,rules, idvar=NULL, case_when( WIN!=0 ~ NA_integer_, abs(!!sym(paste0("X",rule_i))- - !!sym(paste0("Y",rule_i)))>abs(rules[rule_i]) & + !!sym(paste0("Y",rule_i)))>=abs(rules[rule_i]) & (sign(!!sym(paste0("X",rule_i))- !!sym(paste0("Y",rule_i)))==sign(rules[rule_i])) | (!!sym(paste0("X",rule_i))- - !!sym(paste0("Y",rule_i)))>rules[rule_i] & + !!sym(paste0("Y",rule_i)))>=rules[rule_i] & sign(rules[rule_i])==0 ~ 1, abs(!!sym(paste0("X",rule_i))- - !!sym(paste0("Y",rule_i)))>abs(rules[rule_i]) & + !!sym(paste0("Y",rule_i)))>=abs(rules[rule_i]) & (sign(!!sym(paste0("X",rule_i))- !!sym(paste0("Y",rule_i)))!=sign(rules[rule_i])) | (!!sym(paste0("X",rule_i))- - !!sym(paste0("Y",rule_i)))