**0**wrote:

Hello all,

This is probably (hopefully!) a very simple question, but I've reached a bit of a mental block about it.

I have been using Alkes Price's LDHub website (http://ldsc.broadinstitute.org/). It takes GWAS summary statistics as input and calculates the genetic correlations with other traits in the database. It outputs for each trait:

- rg, the genetic correlation
- se, the standard error of rg
- a z score
- a p-value for rg

This is all fine. What I'm struggling on is comparing rgs. I'm theorising that for a given trait, the value of rg might vary between two groups, say European ancestry vs African ancestry. However, I'm struggling on a formal test for that.

Using R I've muddled something together, but I'm not sure if it's valid. rg.A and rg.B are the genetic correlations in the two groups A and B between my trait of interest and a trait in the database (likewise for se.A and se.B).

```
dat$diffZ <- (dat$rg.A - dat$rg.B) / sqrt(dat$se.A^2 + dat$se.B^2)
dat$diffP <- 2*pnorm(abs(dat$diffZ), lower.tail=F)
```

Does that look valid? I'm really not a statistician, so please be gentle! Can provide more info if helpful.

Thanks!