sushie.utils.estimate_her(X: Array | ndarray | bool | number | bool | int | float | complex, y: Array | ndarray | bool | number | bool | int | float | complex, covar: Array | ndarray | bool | number | bool | int | float | complex | None = None, normalize: bool = True) Tuple[float, Array, float, float][source]

Calculate proportion of expression variation explained by genotypes (cis-heritability; \(h_g^2\)).

Parameters:
X: Array | ndarray | bool | number | bool | int | float | complex

\(n \times p\) matrix for independent variables with no intercept vector.

y: Array | ndarray | bool | number | bool | int | float | complex

\(n \times 1\) vector for gene expression.

covar: Array | ndarray | bool | number | bool | int | float | complex | None = None

\(n \times m\) matrix for covariates.

normalize: bool = True

Boolean value to indicate whether normalize X and y

Returns:

A tuple of
  1. genetic variance (float) of the complex trait,

  2. \(h_g^2\) (float) from limix definition,

  3. LRT test statistics (float) for \(h_g^2\),

  4. LRT \(p\) value (float) for \(h_g^2\).

Return type:

Tuple[float, float, float, float, float]


Last update: Oct 27, 2024