Description Usage Arguments Value Author(s) Examples
View source: R/diffSeqLogoSupport.R
Calculates the p-value for the null-hypothesis that two given probability vectors p1, p2 calculated from n1/n2 observations arise from the same distribution
1 2 | calculatePvalue(p1, p2, n1, n2, stackHeight = shannonDivergence,
numberOfPermutations = 100, plotGammaDistributionFit = FALSE)
|
p1 |
first probability vector with one probability for each symbol of the alphabet |
p2 |
second probability vector with one probability for each symbol of the alphabet |
n1 |
number of observations for the calculation of p1 |
n2 |
number of observations for the calculation of p2 |
stackHeight |
function for the calculation of a divergence measure for two probability vectors |
numberOfPermutations |
the number of permutations to perform for the calculation of stackHeights |
plotGammaDistributionFit |
if TRUE the fit of a gamma distribution to the sampled stackHeights is plotted |
a numeric p-value
Hendrik Treutler
1 2 3 4 5 6 7 8 | p1 <- c(0.2, 0.3, 0.1, 0.4)
p2 <- c(0.2, 0.1, 0.3, 0.4)
n1 <- 100
n2 <- 200
numberOfPermutations = 100
plotGammaDistributionFit = TRUE
pValue <- calculatePvalue(p1 = p1, p2 = p2, n1 = n1, n2 = n2, stackHeight = shannonDivergence, numberOfPermutations = numberOfPermutations, plotGammaDistributionFit = plotGammaDistributionFit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.