# Clarification on Linear Model in Hail: genetic relatedness and covariate

**URL:** <https://discuss.hail.is/t/clarification-on-linear-model-in-hail-genetic-relatedness-and-covariate/4091>\
**Category:** Hail Query & hailctl\
**Created:** [March 28, 2025, 5:23pm UTC](https://discuss.hail.is/t/clarification-on-linear-model-in-hail-genetic-relatedness-and-covariate/4091 "2025-03-28T17:23:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsgarlata](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/gsgarlata/32/1257_2.png) [@gsgarlata](https://discuss.hail.is/u/gsgarlata)\
**Post date:** [March 28, 2025, 5:23pm UTC](https://discuss.hail.is/t/clarification-on-linear-model-in-hail-genetic-relatedness-and-covariate/4091/1 "2025-03-28T17:23:01Z")

</div>

I am performing GWAS on simulated data following this tutorial [Hail | GWAS Tutorial](https://hail.is/docs/0.2/tutorials/01-genome-wide-association-study.html).

In particular:

```python
hl.import_plink(bed = InputFile + '.bed', bim = InputFile + '.bim', fam = InputFile + '.fam', quant_pheno = True).write(InputFile + '.mt', overwrite=True)

mt = hl.read_matrix_table(InputFile + '.mt')

gwas_res = hl.linear_regression_rows(y=mt.quant_pheno,x=mt.GT.n_alt_alleles(),covariates=[1.0])

```

My understanding is that the `linear_regression_rows` function perform a linear model of the type:

`Y = XB + e` where `y` is the non-standardised quantitative phenotype, `X` is the individual genotype and `e` is some error.

I am interested to perform GWAS without using a `genetic relatedness matrix`, which I think is achieved by using `linear_regression_rows` instead of linear\_mixed\_model (for instance). Correct?

Also, in my command line above I used `covariates=[1.0]`, should I use `covariates=[0.0]` instead? Or this does not make any difference except for the intercept of the linear regression (which will be equal to the average phenotype )?

Thank you in advance,  
Gabriele
