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, rhos) → {Array.<Number>}
Calculate optimal SKAT test.
This code is based partly on rvtests' implementation (https://git.io/fjQEs) which uses genotypes instead of scores/covariances, and also on the MetaSKAT R-package (https://git.io/fjQEZ).
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. |
rhos |
Array.<Number> | A vector of rho values, representing the weighting between burden and SKAT statistics. |
Returns:
SKAT p-value.
- Type
- Array.<Number>