Extends
- AggregationTest
Methods
(static) weights(mafs, a, b)
Calculate typical SKAT weights using beta density function.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
mafs |
Array.<number> | Array of minor allele frequencies. |
|
a |
number | 1 | alpha defaults to 1. |
b |
number | 25 | beta defaults to 25. |
run(u, v, w, mafs) → {Array.<Number>}
Calculate SKAT test.
The distribution function of the SKAT test statistic is evaluated using Davies' method by default. In the special case where there is only 1 lambda, the Liu moment matching approximation method is used.
Parameters:
Name | Type | Description |
---|---|---|
u |
Array.<Number> | Vector of score statistics (length m, number of variants). |
v |
Array.<Number> | Covariance matrix of score statistics (m x m). |
w |
Array.<Number> | Weight vector (length m, number of variants). If weights are not provided, they will be calculated using the default weights() method of this object. |
mafs |
Array.<Number> | A vector of minor allele frequencies. These will be used to calculate weights if they were not provided. |
Returns:
SKAT p-value.
- Type
- Array.<Number>