# Parsing results from regression on multiple phenotypes

**URL:** <https://discuss.hail.is/t/parsing-results-from-regression-on-multiple-phenotypes/4115>\
**Category:** Hail Query & hailctl\
**Created:** [April 25, 2025, 10:16pm UTC](https://discuss.hail.is/t/parsing-results-from-regression-on-multiple-phenotypes/4115 "2025-04-25T22:16:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sservice2003](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sservice2003](https://discuss.hail.is/u/sservice2003)\
**Post date:** [April 25, 2025, 10:16pm UTC](https://discuss.hail.is/t/parsing-results-from-regression-on-multiple-phenotypes/4115/1 "2025-04-25T22:16:48Z")

</div>

Hi - hail newbie here. I am trying to run linear regression on 8 phenotypes. They can be arranged into 4 sets of 2 each, where each set of 2 has the same missingness structure. My code is:  
lin\_reg = hl.linear\_regression\_rows(  
y=[[filtered\_mt.pheno.A1,filtered\_mt.pheno.A2],  
[filtered\_mt.pheno.B1,filtered\_mt.pheno.B2],  
[filtered\_mt.pheno.C1,filtered\_mt.pheno.C2],  
[filtered\_mt.pheno.D1,filtered\_mt.pheno.D2]],  
x=filtered\_mt.GT.n\_alt\_alleles(),  
covariates=covariates  
)

where A1 & A2 have the same missingness pattern, as do B1/B2, etc.

The output for beta, t-stat, p-value, etc is an array, however, it seems to duplicate information:[[1.94e-01,1.93e-01],[1.94e-01,1.93e-01],[-9.65e-02,1.41e-01],[-9.65e-02,1.41e-01], …

Sorry I can’t figure out how to show the entire string for the first locus, but it has 8 sets within , rather than just 4 (the first 4 are displayed above). You can see that the results for the phenotypes A1 and A2 are duplicated (two sets with 1.94e-01 and 1.93e-01) as are the results for B1 and B2 (two sets with -9.65e-02 and 1.41e-01).

What am I doing wrong to have the output duplicated? And how do I parse these to get at the individual results?

Apologies if my question is unclear!
