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.
Arguments
- X
An input design matrix. This may be centered and/or
standardized prior to calling function.
- y
A vector of response variables.
Value
An ordering of the predictors.
Examples
### 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)