pensim-package: Functions and data for simulation of high-dimensional data...

Description Details Author(s) References See Also Examples

Description

Simulation of continuous, correlated high-dimensional data with time-to-event or binary response, and parallelized functions for Lasso, Ridge, and Elastic Net penalized regression model training and validation by split-sample or nested cross-validation. See the help page for opt.nested.crossval() for the most extensive usage examples.

Details

Package: pensim
Type: Package
License: GPL (>=2)
LazyLoad: yes

Model training and validation by Lasso, Ridge, and Elastic Net penalized regression. This package also contains a function for simulation of correlated high-dimensional data with binary or time-to-event response.

Author(s)

Levi Waldron

Maintainer: Levi Waldron <lwaldron.research@gmail.com>

References

Waldron L, Pintilie M, Tsao M-S, Shepherd FA, Huttenhower C*, Jurisica I*: Optimized application of penalized regression methods to diverse genomic data. Bioinformatics 2011, 27:3399-3406. (*equal contribution)

See Also

penalized-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
set.seed(9)
## 
## create some data,  with one of a group of five correlated variables
## having an association with the binary outcome:
## 
x <- create.data(
  nvars = c(10, 3),
  cors = c(0, 0.8),
  associations = c(0, 2),
  firstonly = c(TRUE, TRUE),
  nsamples = 50,
  response = "binary",
  logisticintercept = 0.5
)
x$summary
##
##predictor data frame and binary response vector
##
pen.data <- x$data[, -match("outcome", colnames(x$data))]
response <- x$data[, match("outcome", colnames(x$data))]
## lasso regression.  Note that epsilon=1e-2 is passed onto optL1,  and
## reduces the precision of the tuning compared to the default 1e-10.
output <-
  opt1D(
    nsim = 1,
    nprocessors = 1,
    penalized = pen.data,
    response = response,
    epsilon = 1e-2
  )
cc <-
  output[which.max(output[, "cvl"]), -1:-3]  ##non-zero b.* are true positives

Example output

  start end cors associations num firstonly
a     1  10  0.0            0  10      TRUE
b    11  13  0.8            2   3      TRUE
lambda= 6.875322 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -24.20415 
lambda= 11.1245 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -28.54894 
lambda= 4.249182 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -22.03816 
lambda= 2.626139 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -18.19819 
lambda= 1.623043 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -17.03062 
lambda= 0.8529987 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -18.12784 
lambda= 1.725982 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.01081 
lambda= 2.069811 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.55344 
lambda= 1.867201 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.60849 
lambda= 1.779923 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.57613 
lambda= 1.686663 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.547 
lambda= 1.746585 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.4307 
lambda= 1.718333 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.42749 
lambda= 1.732438 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.39798 
lambda= 1.725515 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.38869 
lambda= 1.728971 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.38343 
lambda= 1.727124 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.37896 
lambda= 1.726418 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.37797 
lambda= 1.725803 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.37783 
lambda= 1.726111 	1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950cvl= -16.37648 

pensim documentation built on May 11, 2021, 5:06 p.m.