Closed Zepeng-Mu closed 2 years ago
In susie_rss documentation, R is a p by p correlation matrix, so you should use the correlation matrix. If you multiply R by 3201, the z scores should multiply by sqrt(3201) to get the same result.
@zeping where is this documentation that you quoted (which seems to be out of date)
A p by p symmetric, positive semidefinite matrix. It can be X'X, the covariance matrix X'X/(n-1), or a correlation matrix. It should be estimated from the same samples used to compute bhat and shat. Using an out-of-sample matrix may produce unreliable results.
On Wed, Jun 30, 2021 at 2:25 PM Yuxin Zou @.***> wrote:
In susie_rss documentation, R is a p by p correlation matrix, so you should use the correlation matrix. If you multiply R by 3201, the z scores should multiply by sqrt(3201) to get the same result.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stephenslab/susieR/issues/132#issuecomment-871667759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANXRROWESZLMQOPW4W33JDTVNVRNANCNFSM47S5WWXQ .
@stephens999 It is in susie_ss.R
.
Hi, I'm using version "0.11.43" of susieR and found that documentation in ?susie_suff_stat
The documentation you quoted is for susie_suff_stat
, which is different from susie_rss
. If you are using susie_rss
, please check ?susie_rss
.
@zouyuxin so in susie_suff_stat
I find the documentation of the R
matrix confusing.
In the details it says R = (1/(n-1))X'X
But in the documentation for R
it says it can also be X'X.
why is that?
In susie_suff_stat
, the R is converted to a correlation matrix internally. I agree it is clearer to require R to be a correlation matrix in the documentation. I will update the documentation.
Hello, I've been trying to run
susie_rss
using different R matrices. The first version I used is the correlation matrix of genotype count from a reference panel. Part of which looks like:In this way I did not need to scale or center the count matrix, because![Screen Shot 2021-06-30 at 13 37 20](https://user-images.githubusercontent.com/21952317/124015085-e9ca9400-d9a9-11eb-9896-96d952957e4f.png)
cor
gives the same output. The result makes much sense to me:I also saw in package documentation that the
R
option can be:So the second matrix I used is
t(geno) %*% geno
, wheregeno
is the nxp matrix of counts that is centered and scaled. The matrix looks like this:This matrix only differs from the first one by a factor of![Screen Shot 2021-06-30 at 13 36 58](https://user-images.githubusercontent.com/21952317/124015652-87be5e80-d9aa-11eb-841d-0d37869a9ecc.png)
3201
, as I have 3202 individuals in the 1KG reference panel. So I expected the result fromsusie_rss
would be the same as before. However, using this matrix I got no CS and PIP is flat.I'm wondering what can lead to such huge difference in PIP when the
R
is very similar. Should I just use the correlation matrix that is directly calculated from genotype matrix?Thanks so much!