Multiple Testing Adjustment of p-values for S3 objects rlassoEffectsand lm
Multiple Testing Adjustment of p-values for S3 objects rlassoEffects
and lm
Multiple hypotheses testing adjustment of p-values from a high-dimensional linear model.
p_adjust(x,...)## S3 method for class 'rlassoEffects'p_adjust(x, method ="RW", B =1000,...)## S3 method for class 'lm'p_adjust(x, method ="RW", B =1000, test.index =NULL,...)
Arguments
x: an object of S3 class rlassoEffects or lm.
...: further arguments passed on to methods.
method: the method of p-value adjustment for multiple testing. Romano-Wolf stepdown ('RW') is chosen by default.
B: number of bootstrap repetitions (default 1000).
test.index: vector of integers, logicals or variables names indicating the position of coefficients (integer case), logical vector of length of the coefficients (TRUE or FALSE) or the coefficient names of x which should be tested simultaneously (only for S3 class lm). If missing, all coefficients are considered.
Returns
A matrix with the estimated coefficients and the p-values that are adjusted according to the specified method.
Details
Multiple testing adjustment is performed for S3 objects of class rlassoEffects and lm. Implemented methods for multiple testing adjustment are Romano-Wolf stepdown 'RW' (default) and the adjustment methods available in the p.adjust function of the stats package, including the Bonferroni, Bonferroni-Holm, and Benjamini-Hochberg corrections, see p.adjust.methods.
Objects of class rlassoEffects are constructed by rlassoEffects.
Methods (by class)
p_adjust(rlassoEffects): rlassoEffects.
p_adjust(lm): lm.
Examples
library(hdm);set.seed(1)n =100#sample sizep =25# number of variabless =3# nubmer of non-zero variablesX = matrix(rnorm(n*p), ncol=p)colnames(X)<- paste("X",1:p, sep="")beta = c(rep(3,s), rep(0,p-s))y =1+ X%*%beta + rnorm(n)data = data.frame(cbind(y,X))colnames(data)[1]<-"y"lasso.effect = rlassoEffects(X, y, index=c(1:20))pvals.lasso.effect = p_adjust(lasso.effect, method ="RW", B =1000)ols = lm(y ~-1+ X, data)pvals.ols = p_adjust(ols, method ="RW", B =1000)pvals.ols = p_adjust(ols, method ="RW", B =1000, test.index = c(1,2,5))pvals.ols = p_adjust(ols, method ="RW", B =1000, test.index = c(rep(TRUE,5), rep(FALSE, p-5)))
References
J.P. Romano, M. Wolf (2005). Exact and approximate stepdown methods for multiple hypothesis testing. Journal of the American Statistical Association, 100(469), 94-108.
J.P. Romano, M. Wolf (2016). Efficient computation of adjusted p-values for resampling-based stepdown multiple testing. Statistics and Probability Letters, (113), 38-40.
A. Belloni, V. Chernozhukov, K. Kato (2015). Uniform post-selection inference for least absolute deviation regression and other Z-estimation problems. Biometrika, 102(1), 77-94.