| feature.test {MESS} | R Documentation |
Performs randomization tests of features identified by the Lasso
feature.test( x, y, B = 100, type.measure = "deviance", s = "lambda.min", keeplambda = FALSE, olsestimates = TRUE, penalty.factor = rep(1, nvars), alpha = 1, control = list(trace = FALSE, maxcores = 24), ... )
x |
input matrix, of dimension nobs x nvars; each row is an observation vector. |
y |
quantitative response variable of length nobs |
B |
The number of randomizations used in the computations |
type.measure |
loss to use for cross-validation. See |
s |
Value of the penalty parameter 'lambda' at which predictions are
required. Default is the entire sequence used to create the model. See
|
keeplambda |
If set to |
olsestimates |
Logical. Should the test statistic be based on OLS
estimates from the model based on the variables selected by the lasso.
Defaults to |
penalty.factor |
a vector of weights used for adaptive lasso. See
|
alpha |
The elasticnet mixing parameter. See |
control |
A list of options that control the algorithm. Currently
|
... |
Other arguments passed to |
Returns a list of 7 variables:
p.full |
The p-value for the test of the full set of variables selected by the lasso (based on the OLS estimates) |
ols.selected |
A vector of the indices of the non-zero
variables selected by |
p.maxols |
The p-value for the maximum of the OLS test statistics |
lasso.selected |
A vector of
the indices of the non-zero variables selected by |
p.maxlasso |
The p-value for the maximum of the lasso test statistics |
lambda.orig |
The value of lambda used in the computations |
B
|
The number of permutations used |
Claus Ekstrom ekstrom@sund.ku.dk and Kasper Brink-Jensen kbrink@life.ku.dk
Brink-Jensen, K and Ekstrom, CT 2014. Inference for feature selection using the Lasso with high-dimensional data. http://arxiv.org/abs/1403.4296
glmnet
# Simulate some data x <- matrix(rnorm(30*100), nrow=30) y <- rnorm(30, mean=1*x[,1]) # Make inference for features ## Not run: feature.test(x, y) ## End(Not run)