stephenslab / susieR

R package for "sum of single effects" regression.
https://stephenslab.github.io/susieR
Other
176 stars 46 forks source link

estimated prior variance is unreasonably large #146

Open gk1610 opened 2 years ago

gk1610 commented 2 years ago

I have a set of 4567 pvalues from QTLtools for one gene and snps in cis-region. I convert pvalues to zscore using qnorm function. I have LD matrix of R values for 4567 snps in df whenever I run susie, i get this error.

I checked var(zscores_values)=3.322525 fitted_rss <- susie_rss(zscores_values, df, L = 10) Error in susie_suff_stat(XtX = R, Xty = z, n = 2, yty = 1, scaled_prior_variance = prior_variance, : The estimated prior variance is unreasonably large. Please check the input.

Then I did filtering on pvalues with pvalues<1e-05; that reduces the length of zscores from 4567 to 173 snps. I then tried, res1 = susie(df,zscores_value_flt,L = 10) and it works. but not susie_rss

I have plot of plot(zscores_value_flt,predict(res1))

https://www.dropbox.com/s/0cdgaq6wmiljoy2/Screen%20Shot%202021-11-11%20at%206.33.49%20PM.png?dl=0

Any suggestions to fix this?

stephens999 commented 2 years ago

you can't go from p values to z scores without additional information because z scores are signed wheras p values are not. you at least need to know the sign of the estimated beta-hat for each p value and use that to convert your p values to signed z scores (with small p values going to large abs(z)).