group.npvarselec(X, Y, groups, method = "backward", p = 7, fitSPC = TRUE,
degree.pol = 0, kernel.type = "epanech", bandwidth = 0, gridsize = 10,
dim.red = c(1, 10))Backward elimination is done by removing, at each step, the least significant group in the model if its p-value, obtained from the test npmodelcheck, is not significant according to False Discovery Rate (FDR) corrections (Benjamini and Yekutieli, 2001). The final model contains only groups that have significant p-values (based on FDR).
Forward selection is done by adding to the model, at each step, the group with the smallest p-value (when tested with all covariates that are already in the model), if when added, every group in the model is significant according to FDR corrections.
Forward2 selection is as follows: at each step, denote by Z = (Z_1, ..., Z_q) the groups in the model and by W = (W_1, ..., W_r) the groups not in the model (note that (Z,W) = X). Let p_j, j = 1,...r, be the maximum of the set of q+1 p-values obtained from testing each group (Z1,...,Z_q,W_j). Add to the model the group corresponding to the smallest p_j as long as, when added, all the p-values of the groups in the model are significant according to FDR corrections.
See also details of npmodelcheck and localpoly.reg.
Zambom, A. Z. and Akritas, M. G. (2012). b) Signicance Testing and Group Variable Selection. arXiv 1205.6843.
Benjamini, Y. and Yekutieli, D. (2001) The control of false discovery rate in multiple testing under dependency. Annals of Statistics, 29, 1165-1188.
npmodelcheck, localpoly.reg, npvarselecgroups = vector("list",7)
groups[[1]] = c(3,8,5,12,14)
groups[[2]] = c(6,7,9,10)
groups[[3]] = 13
groups[[4]] = c(1,2,4,11)
groups[[5]] = c(15,16, 20)
groups[[6]] = 17
groups[[7]] = c(18,19)
X = matrix(1,100,20)
for (i in 1:20)
X[,i] = rnorm(100)
Y = X[,13]^3 + X[,7] + X[,15]^2 + X[,16] + rnorm(100)
group.npvarselec(X,Y,groups)Run the code above in your browser using DataLab