This function calculates the TWAS z-score and p-value given the weights, z-scores,
and optionally the correlation matrix (R) or the genotype matrix (X).
Usage
twas_z(weights, z, R = NULL, X = NULL)
Arguments
- weights
A numeric vector of weights.
- z
A numeric vector of z-scores.
- R
An optional correlation matrix. If not provided, it will be calculated from the genotype matrix X.
- X
An optional genotype matrix. If R is not provided, X must be supplied to calculate the correlation matrix.
Value
A list containing the following elements: