Datasets:
Upload folder using huggingface_hub
Browse files
scripts/quantify_regions.R
CHANGED
|
@@ -142,7 +142,7 @@ calculate_poisson_pval <- function(total_background_hops,
|
|
| 142 |
# Calculate p-value: P(X >= x) = 1 - P(X < x) = 1 - P(X <= x-1)
|
| 143 |
# This is equivalent to: 1 - CDF(x) + PMF(x)
|
| 144 |
# Using the upper tail directly with lower.tail = FALSE
|
| 145 |
-
pval <- ppois(x - 1, lambda = mu, lower.tail = FALSE)
|
| 146 |
|
| 147 |
return(pval)
|
| 148 |
}
|
|
|
|
| 142 |
# Calculate p-value: P(X >= x) = 1 - P(X < x) = 1 - P(X <= x-1)
|
| 143 |
# This is equivalent to: 1 - CDF(x) + PMF(x)
|
| 144 |
# Using the upper tail directly with lower.tail = FALSE
|
| 145 |
+
pval <- ppois(x - 1, lambda = mu, lower.tail = FALSE, ...)
|
| 146 |
|
| 147 |
return(pval)
|
| 148 |
}
|