<p>If we consult the <a href="https://www.ccg.unam.mx/%7Evinuesa/tlem09/docs/structure_doc.pdf" rel="nofollow noreferrer">structure docs</a>, we observe that they directly address the idea of a <span class="math-container">$Q$</span> distribution for each individual (p. 24), in the form of a Bayesian credible interval, which can be obtained by using the <code>ANCESTDIST</code> flag. Example output is shown on p.34.</p>
<p>It is not clear to me how to summarize across runs given the different initializations, but I'd trust the internal methods more.</p>
<p>I am unsure how to integrate this with CLUMPAK. I'd say that they are probably two different ways of getting at a conceptually similar interpretation.</p>

CC BY-SA 4.0
2024-05-13T17:01:24.147Z
Thanks--setting the ANCESTDIST flag to 1 did generate Bayesian Credible intervals surrounding each value in the Q matrix, for each STRUICTURE run. 

I will look into how to combine these results across runs.
akoontz11
CC BY-SA 4.0
2024-05-10T23:52:53.227Z
2024-05-10T23:52:53.227Z
Maximilian Press
<p><strong>Context</strong>: I've run <a href="https://web.stanford.edu/group/pritchardlab/structure.html" rel="nofollow noreferrer">STRUCTURE</a> on a set of 84 individuals (RADseq data) for a range of K values (2--7). I've specified 20 replicate STRUCTURE runs per K value, and these were passed to <a href="https://tau.evolseq.net/clumpak/index.html" rel="nofollow noreferrer">CLUMPAK</a> to summarize results within and across K values, generating a summary Q-matrix for each K value.</p>
<p><strong>Question</strong>: is there a way to calculate confidence intervals surrounding these summary Q-matrices? My preference is to do so using CLUMPAK, but I am open to other options if they're available. The output of each STRUCTURE run generates a text file containing a Q-matrix, but it isn't clear to me how to combine these for multiple runs to generate confidence intervals.</p>
<p>Thanks for any suggestions!</p>

<clustering><radseq><population-genetics><admixture>
Confidence intervals around Q-matrix values from multiple STRUCTURE runs
# Confidence intervals around Q-matrix values from multiple STRUCTURE runs

(Asked by: username_0 on 2024-05-09)

**Context**: I've run [STRUCTURE](https://web.stanford.edu/group/pritchardlab/structure.html) on a set of 84 individuals (RADseq data) for a range of K values (2--7). I've specified 20 replicate STRUCTURE runs per K value, and these were passed to [CLUMPAK](https://tau.evolseq.net/clumpak/index.html) to summarize results within and across K values, generating a summary Q-matrix for each K value.

**Question**: is there a way to calculate confidence intervals surrounding these summary Q-matrices? My preference is to do so using CLUMPAK, but I am open to other options if they're available. The output of each STRUCTURE run generates a text file containing a Q-matrix, but it isn't clear to me how to combine these for multiple runs to generate confidence intervals.

Thanks for any suggestions!

**Tags:** clustering, radseq, population-genetics, admixture

---

## 1 answers

### Answer by username_1 on 2024-05-10. Score: 1 | Accepted answer

If we consult the [structure docs](https://www.ccg.unam.mx/%7Evinuesa/tlem09/docs/structure_doc.pdf), we observe that they directly address the idea of a $Q$ distribution for each individual (p. 24), in the form of a Bayesian credible interval, which can be obtained by using the `ANCESTDIST` flag. Example output is shown on p.34.

It is not clear to me how to summarize across runs given the different initializations, but I'd trust the internal methods more.

I am unsure how to integrate this with CLUMPAK. I'd say that they are probably two different ways of getting at a conceptually similar interpretation.

> **Comments:**
> **username_0**: Thanks--setting the ANCESTDIST flag to 1 did generate Bayesian Credible intervals surrounding each value in the Q matrix, for each STRUICTURE run.   I will look into how to combine these results across runs.  

---

