Description Usage Arguments Details Value References Examples
View source: R/order.variables.R
Gives an order to the variables and rearrange the input matrix following that order.
1 2 | order.variables(data,Y,maxordre,ordre=c("bolasso","pval","pval_hd","FR"),
var_nonselect,m,showordre)
|
data |
Input matrix of dimension n * p; each of the n rows is an observation vector of p variables. The intercept should be included in the first column as (1,...,1). If not, it is added. |
Y |
Response variable of length n. |
maxordre |
Number of variables to be ordered. Default is min(n/2-1,p/2-1). |
ordre |
Several possible algorithms to order the variables, ordre=c("bolasso","pval","pval_hd","FR"). "bolasso" uses the dyadic algorithm with the Bolasso technique |
var_nonselect |
Number of variables that don't undergo feature selection. They have to be in the first columns of |
m |
Number of bootstrapped iteration of the Lasso. Only use if the algorithm is set to "bolasso". Default is m=100. |
showordre |
If showordre=TRUE, show the variables being ordered at each step of the algorithm. |
Rank the variables of data
taking into account the vector of observations Y
and rearrange the input matrix following that order.
data |
A list containing:
|
data_ord |
Input data matrix rearranged by ORDREBETA |
ORDRE |
Gives the |
ORDREBETA |
Gives the order on all the variables of the data matrix (either arbitrary completion of ORDRE -‘Bolasso’ and ‘FR’, or the true order -‘pval’ and ‘pval_hd’). |
Multiple hypotheses testing for variable selection; F. Rohart 2011
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
x=matrix(rnorm(100*20),100,20)
beta=c(rep(2,5),rep(0,15))
y=x%*%beta+rnorm(100)
res.bolasso=order.variables(x,y,maxordre=15,ordre="bolasso")
res.pval=order.variables(x,y,ordre="pval")
res.FR=order.variables(x,y,maxordre=15,ordre="FR")
res.pval.hd=order.variables(x,y,maxordre=15,ordre="pval_hd")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.