Description Usage Arguments Value Author(s) References Examples
It returns p-values of the NST and ST. Can only apply to linear model. Not applicable for binary outcome.
1 | ST(X.f, Y.f, sub.size, test.set, M = 500)
|
X.f |
Variables of interest; each row for a subject, and each column for predictor).A matrix with dimension n by p. |
Y.f |
Response or phenotype data. It can be either a binary trait or a quantitative trait. A vector with length n (number of subjects). |
sub.size |
The size for the first pruning step. The authors recommend set sub.size = 0.3 * n. |
test.set |
The indicator for the variable of interest. |
M |
the number of bootstrap replications |
The non-studentized and studentized statistics and corresponding p-values.
Zhang, X., & Cheng, G.
Zhang, X., & Cheng, G. (2017). Simultaneous inference for high-dimensional linear models. Journal of the American Statistical Association, 112(518), 757-768.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Generate the data (codes for the simulations in the manuscript)
n = 30
signal.r = 0
nInformative = 3
p = 40
seed = 1
s = 0.01
non.zero = floor((p/2) * s)
alpha = c(rep(0,p/2 - non.zero), runif(non.zero,-signal.r,signal.r))
beta = c(rep(2,nInformative), rep(0,(p/2- 3)), alpha)
dat = sim_data(seed, n = n, p = p, beta = beta)
sub.size <- n*0.3
test.set = (p/2 + 1):p
X = dat$X
Y = dat$Y
cov = NULL
#ST(X, Y, sub.size, test.set,M = nperm) #not run, time-consuming
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.