pal.statistics
public class ContigencyTable extends java.lang.Object
Constructor and Description |
---|
ContigencyTable(int maxSize)
constructor for Contigency table
|
Modifier and Type | Method and Description |
---|---|
double |
calcContigencyChiSquare(int permutations)
This calculates the probability in the normal approach, using the Chi Square as the test statistic.
|
double |
calcMonteCarloExactTest(int permutations)
This calculates the probability in the normal permutation approach, using the method described
by Weir, B.
|
double |
calcRapidContigencyChiSquare(int maxPermutations)
This calculates the probability in a rapid approach, using the Chi Square as the test statistic.
|
double |
calcRapidMonteCarloExactTest(int maxPermutations)
This calculates the probability in the rapid permutational approach, using the method described
by Weir, B.
|
void |
setMatrix(int[][] tcontig)
sets the data for the contigency table, must be set before other methods are called.
|
public ContigencyTable(int maxSize)
maxSize
- is the maximum sum that will be encountered by contigency tablepublic void setMatrix(int[][] tcontig)
contig
- is the array of integers with observed statespublic double calcRapidContigencyChiSquare(int maxPermutations)
maxPermutations
- Number of permutations used to calculate the probabilitypublic double calcContigencyChiSquare(int permutations)
permutations
- Number of permutations used to calculate the probabilitypublic double calcRapidMonteCarloExactTest(int maxPermutations)
reps
- is the number of permutations used to the probabilitypublic double calcMonteCarloExactTest(int permutations)
permutations
- Number of permutations used to the probability