Rfast (version 1.7.3)

Many 2 sample proportions tests: Many 2 sample proportions tests

Description

It performs very many 2 sample proportions tests.

Usage

proptests(x1, x2, n1, n2)

Arguments

x1
A vector with the successes of the one group.
x2
A vector with the successes of the one group.
n1
A vector with the number of trials of the one group.
n2
A vector with the number of trials of the one group.

Value

A matrix with the proportions of each group (two columns), the test statistic and the p-value of each test.

Details

The 2-sample proportions test is performed for each pair of proportions of teh two groups.

References

B. L. Welch (1951). On the comparison of several mean values: an alternative approach. Biometrika, 38(3/4), 330-336.

See Also

ttests, ftests, colVars

Examples

Run this code
## 10000 variables, hence 10000 t-tests will be performed
set.seed(12345)
x1 <- rpois(10000, 5)
x2 <- rpois(10000, 5)
n1 <- rpois(10000, 40)
n2 <- rpois(10000, 40)
a <- proptests(x1, x2, n1, n2)
system.time( proptests(x1, x2, n1, n2) )

Run the code above in your browser using DataLab