> For the complete documentation index, see [llms.txt](https://finngen.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://finngen.gitbook.io/documentation/methods/phewas/logistic-regression.md).

# Association tests

## Endpoint

We included 2,755 endpoints in the analysis, which consisted of 2,499 binary endpoints and 3 quantitative endpoints (HEIGHT\_IRN, WEIGHT\_IRN, BMI\_IRN). Endpoints with less than 50 cases among the 500,348 samples were excluded, as well as endpoints labeled with an OMIT tag in the endpoint definition file.

The quantitative endpoints HEIGHT and WEIGHT were acquired from minimum phenotype data. After that, phenotype BMI was formed from them, and all of them were inverse normal transformed.

## Null models

For regenie step 1 LOCO prediction computation for each endpoint, we used age, sex, 10 PCs, Finngen 1 or 2 chip or legacy genotyping batch as covariates. For sex-specific phenotypes, sample sex was left out from the covariates. We excluded covariates that had less than 10 cases.

For calculating genetic relatedness in regenie step 1, we included variants 1) imputed with an INFO score > 0.95 in all batches and 2) > 97 % non-missing genotypes and 3) MAF > 1 %. The remaining variants were LD pruned with a 1.5Mb window and r2 threshold of 0.2. This resulted in a set of 188,153 well-imputed not rare variants for relatedness calculation.

We used a genotype block size of 1,000 in regenie step 1.

## Association tests

We ran association tests with regenie for each of the 2,755 endpoints for each variant with a minimum allele count of 5 among each phenotype’s cases and controls. We used the approximate Firth test for variants with an initial p-value of less than 0.01 and computed the standard error based on effect size and likelihood ratio test p-value (regenie options --firth --approx --pThresh 0.01 --firth-se).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://finngen.gitbook.io/documentation/methods/phewas/logistic-regression.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
