- sushie.utils.regress_covar(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, no_regress: bool) Tuple[Array, Array] [source]
Regress phenotypes and genotypes on covariates and return the residuals.
- Parameters:
- X: Array | ndarray | bool | number | bool | int | float | complex¶
\(n \times p\) genotype matrix.
- y: Array | ndarray | bool | number | bool | int | float | complex¶
\(n \times 1\) phenotype vector.
- covar: Array | ndarray | bool | number | bool | int | float | complex¶
\(n \times m\) matrix for covariates.
- no_regress: bool¶
boolean indicator whether to regress genotypes on covariates.
- Returns:
- A tuple of
genotype residual matrix after regressing out covariates effects (
Array
),phenotype residual vector (
Array
) after regressing out covariates effects.
- Return type:
Tuple[Array, Array]
Last update:
Oct 27, 2024