Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
emdelponte committed Oct 15, 2023
1 parent 95f0863 commit 97fbf3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/doublets.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ doublets.test <- function(x) {
ZDb = (Db - EDb) / SDb

# pvalue is the p-value of the Z-score
pvalue <- (pnorm(abs(ZDb), lower.tail = FALSE))
pvalue <- (1- pnorm(abs(ZDb), lower.tail = TRUE))

# result is "aggregation or clustering" if the Z-score is greater than 1.64, otherwise it is "randomness"
result <- ifelse(abs(ZDb) >= 1.64,
Expand Down
4 changes: 2 additions & 2 deletions R/oruns.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ oruns.test <- function(x) {
Z = (U - EU) / sU

# pvalue is the p-value of the Z-score
pvalue <- (pnorm(abs(Z), lower.tail = FALSE))
pvalue <- (1 - pnorm(abs(Z), lower.tail = TRUE))

# result is "clustering" if the Z-score is less than 1.64, otherwise it is "randomness"
result <- ifelse(Z < 1.64,
result <- ifelse(Z < -1.64,
c("aggregation or clustering"),
c("randomness"))

Expand Down

0 comments on commit 97fbf3c

Please sign in to comment.