lassosumR: Function to obtain LASSO estimates of a regression problem...

Description Usage Arguments Details Value Note

View source: R/lassosumR.R

Description

Function to obtain LASSO estimates of a regression problem given summary statistics and a reference panel (without PLINK bfile)

Usage

1
2
3
lassosumR(cor, refpanel, lambda = exp(seq(log(0.001), log(0.1),
  length.out = 20)), shrink = 0.9, ridge = F, thr = 1e-04,
  init = NULL, trace = 0, maxiter = 10000, blocks = NULL)

Arguments

cor

A vector of correlations (r)

refpanel

reference panel as data.frame or matrix

lambda

A vector of λs (the tuning parameter)

shrink

The shrinkage parameter s for the correlation matrix R

ridge

Produce ridge regression results also (slow if nrow(refpanel) > 2000)

thr

convergence threshold for β

init

Initial values for β

trace

An integer controlling the amount of output generated.

maxiter

Maximum number of iterations

blocks

A vector to split the genome by blocks (coded as c(1,1,..., 2, 2, ..., etc.))

Details

A function to find the minimum of β in

f(β)=β'Rβ - 2β'r + 2λ||β||_1

where

R=(1-s)X'X/n + sI

is a shrunken correlation matrix, with X being standardized reference panel. s should take values in (0,1]. r is a vector of correlations.

Value

A list with the following

lambda

same as the lambda input

beta

A matrix of estimated coefficients

conv

A vector of convergence indicators. 1 means converged. 0 not converged.

pred

=(1-s)Xβ

loss

=(1-s)β'X'Xβ/n - 2β'r

fbeta

=β'Rβ - 2β'r + 2λ||β||_1

sd

The standard deviation of the reference panel SNPs

shrink

same as input

nparams

Number of non-zero coefficients

ridge

ridge regression estimates

Note


tshmak/lassosum documentation built on Sept. 24, 2020, 9:41 a.m.