Skip to content

Commit

Permalink
update runs and doublets
Browse files Browse the repository at this point in the history
  • Loading branch information
emdelponte committed Oct 12, 2023
1 parent ffee07b commit 2a7c5df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
5 changes: 1 addition & 4 deletions 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 <- (2 * pnorm(abs(ZDb), lower.tail = FALSE))
pvalue <- (pnorm(abs(ZDb), lower.tail = FALSE))

# 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 All @@ -47,7 +47,4 @@ doublets.test <- function(x) {

# Return the results as a list
return(list(Db = Db, EDb = EDb, ZDb = ZDb, pvalue = pvalue, result = result))



}
4 changes: 2 additions & 2 deletions R/oruns.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ oruns.test <- function(x) {
Z = (U - EU) / sU

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

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

# Return the results as a list
Expand Down

0 comments on commit 2a7c5df

Please sign in to comment.