Lassosum RSS: LASSO on summary statistics with LD reference
Source:R/regularizedRegressionWrappers.R
lassosumRss.RdCoordinate descent to solve the penalized regression on summary statistics: $$f(\beta) = \beta' R \beta - 2\beta' r + 2\lambda ||\beta||_1$$ where \(R\) is the LD matrix (pre-shrunk if desired) and \(r = \hat\beta / \sqrt{n}\).
Arguments
- bhat
A vector of marginal effect sizes.
- R
The LD correlation matrix (a single matrix over the analysed window), as in
susieR::susie_rss(). If shrinkage is desired, apply it before passing (e.g.,(1-s)*R + s*I).- n
Sample size of the GWAS.
- lambda
A vector of L1 penalty values. Default: 20 values from 0.001 to 0.1 on log scale.
- thr
Convergence threshold. Default: 1e-4.
- maxiter
Maximum number of iterations. Default: 10000.
Value
A list containing:
- betaEst
Posterior estimates of SNP effect sizes at best lambda.
- beta
Matrix of estimates (p x nlambda).
- lambda
The lambda values used.
- conv
Convergence indicators (1 = converged).
- loss
Quadratic loss at each lambda.
- fbeta
Full objective value at each lambda.
- nparams
Number of non-zero coefficients at each lambda.