Description Details Author(s) References See Also Examples

Compute the covariance test significance testing in adaptive linear modelling. Can be used with LARS (lasso) for linear models, elastic net, binomial and Cox survival model. This package should be considered EXPERIMENTAL. The background paper is not yet published and rigorous theory does not yet exist for the logistic and Cox models.

Package: | covTest |

Type: | Package |

Version: | 1.0 |

Date: | 2013-01-08 |

License: | GPL-2 |

Very simple to use. Takes output from one of `lars`

, `lars.en`

,`lars.glm`

and compute covariance test and p-values.
Requires `lars`

and `glmpath`

packages. `lars.en`

and `lars.glm`

are included in this package.
Functions are:
`covTest`

`lars.en`

`lars.glm`

`predict.lars.en`

`predict.lars.glm`

Rob Tibshirani [email protected]

A significance test for the lasso (2013). Lockhart, R., Taylor, J., Tibshirani (Ryan) and Tibshirani (Robert)

covTest, lars.glm, lars.en

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 | ```
x=matrix(rnorm(100*10),ncol=10)
x=scale(x,TRUE,TRUE)/sqrt(99)
#Gaussian
beta=c(4,rep(0,9))
y=x%*%beta+.4*rnorm(100)
a=lars(x,y)
covTest(a,x,y)
#Elastic net
a=lars.en(x,y,lambda2=1)
covTest(a,x,y)
#logistic
y=1*(y>0)
a=lars.glm(x,y,family="binomial")
covTest(a,x,y)
# Cox model
#y=6*x[,2]+rnorm(100)+10
#status=sample(c(0,1),size=length(y),replace=TRUE)
#a=lars.glm(x,y,status=status,family="cox")
#covTest(a,x,y,status=status)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.