univar.order | R Documentation |
This function extracts the ordering of the predictors according to the coefficients estimated in a basic univariate regression; in particular, the predictors are ordered in decreasing order by magnitude of the univariate regression coefficient estimate.
univar.order(X, y)
X |
An input design matrix. This may be centered and/or standardized prior to calling function. |
y |
A vector of response variables. |
An ordering of the predictors.
### generate synthetic data
set.seed(1)
n = 200
p = 300
X = matrix(rnorm(n*p),n,p)
beta = double(p)
beta[1:10] = 1:10
y = X %*% beta + rnorm(n)
univ.order = univar.order(X,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.