# Logistic regression using firth test returns N

**URL:** <https://discuss.hail.is/t/logistic-regression-using-firth-test-returns-n/3466>\
**Category:** Science\
**Created:** [July 5, 2023, 10:21pm UTC](https://discuss.hail.is/t/logistic-regression-using-firth-test-returns-n/3466 "2023-07-05T22:21:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hirbokazi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@hirbokazi](https://discuss.hail.is/u/hirbokazi)\
**Post date:** [July 5, 2023, 10:21pm UTC](https://discuss.hail.is/t/logistic-regression-using-firth-test-returns-n/3466/1 "2023-07-05T22:21:32Z")

</div>

I am trying to replicate GWAS results for 7 variants that when I perform logistic regression analysis using firth test returns NAs and works fine with linear regression. the sample sizes and MAF are not terrible because that might be reason

| | | | | | | | Hail\_linear (age, PC1-PC5) | | |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| SNP | N\_males\_afr | N\_Case\_afr | N\_controls\_afr | MAC | MAF | freq\_case | freq\_controls | beta | se |
| a | 3138 | 384 | 2647 | 200 | 3.19E-02 | 0.032552 | 0.003211 | -1.61E-02 | 1.08E-02 |
| b | 3138 | 384 | 2647 | 161 | 2.57E-02 | 0.023438 | 0.001511 | -5.45E-03 | 1.22E-02 |
| c | 3138 | 384 | 2647 | 117 | 1.86E-02 | 0.022135 | 0.0034 | 3.95E-02 | 1.39E-02 |
| d | 3138 | 384 | 2647 | 201 | 3.20E-02 | 0.028646 | 0.003589 | -1.87E-02 | 1.09E-02 |

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [July 13, 2023, 6:13pm UTC](https://discuss.hail.is/t/logistic-regression-using-firth-test-returns-n/3466/2 "2023-07-13T18:13:58Z")

</div>

Hey @hirbokazi !

Can you share the code you used for linear regression and the code for logistic regression?
