From 41339ef56f7e2732149838423104bc1ce5e5a8a9 Mon Sep 17 00:00:00 2001 From: "Emerson M. Del Ponte" Date: Thu, 24 Oct 2024 08:36:33 -0300 Subject: [PATCH] return abs value for the max correlation --- R/windowpane_tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/windowpane_tests.R b/R/windowpane_tests.R index 55a3d46..88b4947 100644 --- a/R/windowpane_tests.R +++ b/R/windowpane_tests.R @@ -120,7 +120,7 @@ windowpane_tests <- function(data, response_var, corr_type = "spearman", R = 100 global_significant <- Pg < global_alpha # Find the maximum correlation - max_correlation <- max(results$correlation, na.rm = TRUE) + max_correlation <- max(abs(results$correlation), na.rm = TRUE) # Add global Pg and max correlation as a separate row summary_table <- data.frame(