Description Usage Arguments Details Value Author(s) See Also Examples
Arranges and visualizes the importance of groups for the results of
grp.criValues
.
1 | importance(grp.values, n = 10, plot = TRUE)
|
grp.values |
The result from |
n |
Number of important groups to display. The default is the top 10 groups. |
plot |
A logical value indicating whether to make a barplot of the importance of groups. |
This function arranges the values of screening criterion from the most important to the least important, and then make a barplot to visualize the importance.
A matrix containing the first n
important group indices and values of
screening criterion.
Debin Qiu, Jeongyoun Ahn
1 2 3 4 5 6 7 8 9 10 11 12 | library(MASS)
n <- 30 # sample size
p <- 3 # number of predictors in each group
J <- 50 # number of groups
group <- rep(1:J,each = 3) # group indices
Sigma <- diag(p*J) # covariance matrix
X <- mvrnorm(n,seq(0,5,length.out = p*J),Sigma)
beta <- runif(12,-2,5) # coefficients
y <- X%*%matrix(c(beta,rep(0,p*J-12)),ncol = 1) + rnorm(n)
crivalues <- grp.criValues(X,y,group) # gSIS
importance(crivalues, n = 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.