binomial_test {LocaTT} | R Documentation |
Performs binomial tests.
binomial_test(k, n, p, alternative = "greater")
k |
A numeric vector of the number of successes. |
n |
A numeric vector of the number of trials. |
p |
A numeric vector of the hypothesized probabilities of success. |
alternative |
A string specifying the alternative hypothesis. Must be |
Calls on the pbinom
function in the stats package to perform vectorized binomial tests. Arguments are recycled as in pbinom
. Only one-sided tests are supported, and only p-values are returned.
A numeric vector of p-values from the binomial tests.
binomial_test(k=c(5,1,7,4),
n=c(10,3,15,5),
p=c(0.2,0.1,0.5,0.6),
alternative="greater")