Description Usage Arguments Details Value Note Author(s) References See Also Examples

This function computes covariance test for inference in adaptive linear modelling, for lasso (least angle regression) in the Gaussian case, binomial/logistic and Cox proportional hazards survival models. 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. We have currently disabled the Cox option, as it is not yet reliable.

1 |

`fitobj` |
Result of a call to |

`x` |
N by p matrix of predictors |

`y` |
N-vector of outcome values |

`sigma.est` |
Estimate of error standard deviation. If a numerical value, that value if used. If "full" the (square root) of the mean squared residual from the full model is used. |

`status` |
Optional N-vector of censoring indicators for Cox Proportional hazards model. 1=failed; 0=censored. |

`maxp` |
Optional limit for number of steps to be analyzed. |

This function computes covariance test for inference in adaptive linear modelling, for lasso (least angle regression) in the Gaussian case, binomial/logistic and Cox proportional hazards survival models. It estimates p-values for each predictor entered, that account for the adpative nature of the fitting.

`results ` |
Table of covariance test values and p-values, for each predictor entered |

`sigma` |
Estimate of sigma used |

`null.dist` |
Null distribution used to compute p-values |

This function requires the `lars`

R library (for the Gaussian case), and the `glmpath`

function for the logistic and Cox model.

Rob Tibshirani

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

lars, lars.en, lars.glm

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 | ```
set.seed(1234)
x=matrix(rnorm(100*10),ncol=10)
x=scale(x,TRUE,TRUE)/sqrt(99)
beta=c(4,rep(0,9))
y=x%*%beta+.4*rnorm(100)
#Gaussian
a=lars(x,y)
covTest(a,x,y)
#EN
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.