Skip to contents

Coordinate 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}\).

Usage

lassosumRss(
  bhat,
  R,
  n,
  lambda = exp(seq(log(1e-04), log(0.1), length.out = 20)),
  thr = 1e-04,
  maxiter = 10000
)

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.

Details

Based on Mak et al (2017) "Polygenic scores via penalized regression on summary statistics", Genetic Epidemiology 41(6):469-480.

Internal: lassosumRssWeights is the public interface. It runs this over a grid of LD shrinkage values, forwards lambda, thr and maxiter through LassosumOptions, and with fitRetention returns the paths as the "fit" attribute of its weights.