> For the complete documentation index, see [llms.txt](https://docs.finngen.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finngen.fi/background-reading/conditional-analysis.md).

# Conditional analysis

In addition to fine-mapping, a more robust way is to use **stepwise forward selection** (also called **iterative conditioning**, or **conditional analysis**) to build iteratively a set *S* of SNPSs based on an initial "seed" variant, it usually being the lead variant (lowest pval) of a certain region. The next step is to perform a regular analysis where now variants in *S* are treated as covariates. If the new lead variant is significant, it's added to *S* and the analysis is repeated as long as lead variants remain within significance. This approach was made popular by [GCTA](https://cnsgenomics.com/software/gcta/#Overview)’s Conditional & joint (COJO) analysis of GWAS results.\
\
The algorithm works as follows:

```
initially S is empty
repeat until all P-values outside S are > threshold
  add SNP with the lowest P-value to S
  update P-values of all SNPs 'l' outside S using joint model Y ~ X.S + X.l
end repeat
```
