stephenslab / susieR

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

compute_ss function #48

Closed pcarbo closed 5 years ago

pcarbo commented 5 years ago

@zouyuxin I was thinking it would be useful to have a function, something like compute_ss(X, y, standardize = TRUE), to compute the summary statistics from the "raw" data. The summary statistics computed would be the first 3 or 4 arguments to susie_ss. This would greatly simplify the code and reduce errors.

zouyuxin commented 5 years ago

@pcarbo the summary statistics version is aimed to be applied with betahat, var(y), or z scores, and LD or correlation matrix(XtX). So there is no individual level data. Xty should be derived from the summary statistics.

pcarbo commented 5 years ago

I understand, but sometimes it is useful to be able to compute summary statistics from the raw data (e.g., for testing).

zouyuxin commented 5 years ago

@pcarbo I added the function compute_ss, and change the example in susie_ss

pcarbo commented 5 years ago

@zouyuxin Thanks! Don't forget to re-run devtools::document() after updating roxygen2 syntax.