importance: Arrange and visualize the importance of groups

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Arranges and visualizes the importance of groups for the results of grp.criValues.

Usage

1
importance(grp.values, n = 10, plot = TRUE)

Arguments

grp.values

The result from grp.criValues.

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.

Details

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.

Value

A matrix containing the first n important group indices and values of screening criterion.

Author(s)

Debin Qiu, Jeongyoun Ahn

See Also

grp.criValues

Examples

 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)

debinqiu/grpss documentation built on May 15, 2019, 1:54 a.m.