subset.lassosum.pipeline: Subset a lassosum.pipeline object by lambda and s

Description Usage Arguments Details Value Examples

View source: R/subset.lassosum.pipeline.R

Description

Subset a lassosum.pipeline object by lambda and s

Usage

1
2
3
## S3 method for class 'lassosum.pipeline'
subset(lassosum.pipeline, s = NULL,
  lambda = NULL)

Arguments

lassosum.pipeline

An object returned by lassosum.pipeline

s

Value(s) of s to restrict to

lambda

Value(s) of lambda to restrict to

Details

This function is usually used to reapply a validated pgs to a new data.set. See example below.

Value

A lassosum.pipeline object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
 ### Run lassosum using standard pipeline ### 
 lp <- lassosum.pipeline(cor=cor, chr=ss$Chr, pos=ss$Position, 
                          A1=ss$A1, A2=ss$A2,
                          ref.bfile=ref.bfile, test.bfile=test.bfile, 
                          LDblocks = ld)
 v <- validate(lp)
 lp2 <- subset(lp, s=v$best.s, lambda=v$best.lambda)
 v2 <- validate(lp2)

## End(Not run)

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