Skip to content

Commit

Permalink
return abs value for the max correlation
Browse files Browse the repository at this point in the history
  • Loading branch information
emdelponte committed Oct 24, 2024
1 parent f66ce85 commit 41339ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/windowpane_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 41339ef

Please sign in to comment.