I have used PCA on a group of individuals based on a specific feature of their genetic data. I now want to see if PC1 or PC2 correlates with their grouping based on geographic location (each individual falls into one of 12 groups based on their location). So basically, I want to ask do individuals in group 1 have significantly lower PC1 values compared with the rest of the individuals? Any ideas on how to test this?

  • $\begingroup$ Depends on the number of observations you have, you can run a multinomial logistic regression with the PCs as explanatory variables and the Geographic groups as the response. That should tell you if you have correlation between the two and allow you to test it. $\endgroup$
    – Kozolovska
    Jul 9, 2023 at 16:53
  • $\begingroup$ @Kozolovska If im correct, this is used for tests concerning two categorical variables, whereas my problem involves one categorical variable (geographic group) and one continuous variable (the value of PC2). $\endgroup$
    – Róisín
    Jul 9, 2023 at 17:26
  • $\begingroup$ Make maps of the PCs and examine them. $\endgroup$
    – whuber
    Jul 9, 2023 at 18:18

1 Answer 1


Welcome to the site.

The first step is to look. I would start with a parallel box (or violin) plot or parallel strip plot (depending on how much data you have; box plots are good when you have a lot of data).

One good question, though, is which is the DV and which is the IV (if either is either). Before you do any regression, you'd want to settle that. This could depend on the size of the regions. If they are big regions of the globe (e.g. east Asia, north America, etc.) then I think the scores would be DVs. At that level, there are genetic differences and your PCs may be capturing that. If it is much smaller regions, then I'd carefully think about those regions and why they might be different.

If there is no reason for them to be different, then, whatever test you do, you might just be searching for type 1 errors. This is a complex question, but one that requires careful collaboration between you (as substantive expert) and a statistician.

I think you should consider hiring a consultant; not me, I've retired.

But, if you have questions about what I have suggested, I'll try to answer. It just may be beyond the scope of this site.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.