ST: Three Step Procedure

Description Usage Arguments Value Author(s) References Examples

View source: R/ST.R

Description

It returns p-values of the NST and ST. Can only apply to linear model. Not applicable for binary outcome.

Usage

1
ST(X.f, Y.f, sub.size, test.set, M = 500)

Arguments

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

Value

The non-studentized and studentized statistics and corresponding p-values.

Author(s)

Zhang, X., & Cheng, G.

References

Zhang, X., & Cheng, G. (2017). Simultaneous inference for high-dimensional linear models. Journal of the American Statistical Association, 112(518), 757-768.

Examples

 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

ChongWu-Biostat/aispu documentation built on Jan. 4, 2020, 1:23 a.m.