Skip to content

Commit

Permalink
modify check.tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jdreyf committed Aug 5, 2024
1 parent 4d94d1b commit 6ff7a78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: DirectionalMaxPTest
Title: Directional MaxP test for replication, mediation, & qualitative interactions and ScreenDMT for improving FDR and FWER when applying DMT to test multiple hypotheses
Version: 0.0.1.9001
Version: 0.0.1.9002
Authors@R:
person(given = "Jonathan",
family = "Dreyfuss",
Expand All @@ -10,7 +10,7 @@ Description: Directional MaxP test for replication, mediation, & qualitative int
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Imports:
dplyr,
stats
Expand Down
2 changes: 1 addition & 1 deletion R/dmt.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dmt <- function(tab, cols=1:4, prod.sgn=1, reorder.rows=FALSE, fdr.method=c("BH"
stat.cols <- cols[c(1, 3)]
p.cols <- cols[c(2, 4)]
# require rownames for consistency with hitman2_replication, which needs them st can reorder
stopifnot(0 <= tab[, p.cols], tab[, p.cols] <= 1, !is.na(tab), is.logical(reorder.rows), !is.null(rownames(tab)))
stopifnot(0 <= tab[, p.cols], tab[, p.cols] <= 1, !is.na(tab[, cols]), is.logical(reorder.rows), !is.null(rownames(tab)))

if (nrow(tab) > 10 & (all(tab[, stat.cols] >= 0) | all(tab[, stat.cols] <= 0))){
warning("All stats are the same sign, which is possible but unlikely for more than ten two-sided stats.")
Expand Down

0 comments on commit 6ff7a78

Please sign in to comment.