public class CorrelationStats extends Object
Constructor and Description |
---|
CorrelationStats() |
Modifier and Type | Method and Description |
---|---|
static double |
byteToCorrel(int correlByte) |
static double |
byteToPvalue(int pvalByte) |
static double |
compare(double correl1,
int n1,
double correl2,
int n2)
Statistical comparison of two Pearson correlations.
|
static double |
correl(double[] ival,
double[] jval)
Compute the Pearson correlation, missing values are permitted.
|
static int |
correlAsByte(double correl) |
static double |
correlationForPvalue(double pval,
int count)
Find the approximate Pearson correlation required to meet a particular pvalue.
|
static double |
correlationTstat(double correl,
int dof)
Compute the t-statistic associated with a Pearson correlation.
|
static double |
correlFast(double[] ival,
double[] jval,
double meani,
double meanj,
double sqrti,
double sqrtj)
Compute Pearson correlation when there are no missing values.
|
static double |
fisherTransform(double r)
Compute the Fisher z transform of the Pearson correlation.
|
static cern.colt.list.DoubleArrayList |
fisherTransform(cern.colt.list.DoubleArrayList e)
Fisher-transform a list of Pearson correlations.
|
static boolean |
isValidPearsonCorrelation(double r)
Test if a value is a reasonable Pearson correlation (in the range -1 to 1; values outside of this range are
acceptable within a small roundoff.
|
static double |
pvalue(double correl,
int count)
Compute pvalue for the pearson correlation, using the t distribution method.
|
static int |
pvalueAsByte(double correl,
int count)
Convert a p value into a value between 0 and 255 inclusive.
|
static double |
spearmanPvalue(double correl,
int count) |
static double |
unFisherTransform(double z)
Reverse the Fisher z-transform of Pearson correlations
|
public static double byteToCorrel(int correlByte)
correlByte
- intpublic static double byteToPvalue(int pvalByte)
pvalByte
- intpublic static double compare(double correl1, int n1, double correl2, int n2)
correl1
- First correlationn1
- Number of values used to compute correl1correl2
- Second correlationn2
- Number of values used to compute correl2public static double correl(double[] ival, double[] jval)
ival
- jval
- public static int correlAsByte(double correl)
correl
- doublepublic static double correlationForPvalue(double pval, int count)
pval
- doublecount
- intpublic static double correlationTstat(double correl, int dof)
correl
- Pearson correlationdof
- Degrees of freedom (n - 2)public static double correlFast(double[] ival, double[] jval, double meani, double meanj, double sqrti, double sqrtj)
ival
- jval
- meani
- meanj
- sqrti
- sqrtj
- public static double fisherTransform(double r)
r
- Correlation coefficient.public static cern.colt.list.DoubleArrayList fisherTransform(cern.colt.list.DoubleArrayList e)
e
- public static boolean isValidPearsonCorrelation(double r)
r
- public static double pvalue(double correl, int count)
correl
- Pearson correlation.count
- Number of items used to calculate the correlation. NOT the degrees of freedom.public static int pvalueAsByte(double correl, int count)
correl
- doublecount
- intpublic static double spearmanPvalue(double correl, int count)
correl
- Spearman's correlationcount
- public static double unFisherTransform(double z)
z
- Copyright © 2003–2022 UBC Michael Smith Laboratories. All rights reserved.