aispu: Adaptive Interaction Sum of Powered Score (aiSPU) Tests

Description Usage Arguments Value Author(s) References Examples

View source: R/aispu.R

Description

It returns p-values of the iSPU tests and aiSPU test.

Usage

1
2
3
4
aispu(Y, X, cov = NULL, cov2, pow = c(1:6, Inf), model = c("gaussian",
  "binomial"), n.perm = 1000, penalty = c("tlp", "lasso", "ridge", "net",
  "mcp", "SCAD"), tau = 0.1, standardize = FALSE, dfmax = 1000,
  pmax = 1000, resample = c("asy", "asy-boot", "boot"),bandwidth = 3)

Arguments

Y

Response or phenotype data. It can be either a binary trait or a quantitative trait. A vector with length n (number of subjects).

X

Variables of interest; each row for a subject, and each column for predictor).A matrix with dimension n by p.

cov

Ancillary covariates without penalization, such as age, gender, and etc.

cov2

High-dimensional covariates with penalization.

pow

Power used in iSPU test. A vector of the powers.

model

Use "gaussian" for a quantitative trait, and use "binomial" for a binary trait.

n.perm

The number of boostrap replications

penalty

Penalty for cov2. The default is truncated lasso (tlp). We recommend using tlp in real data applications.

tau

Tunning parameters for tlp.

standardize

Logical flag for x variable standardization, prior to fitting the model sequence. The coefficients are always returned on the original scale. Default is standardize=TRUE. If variables are in the same units already, you might not wish to standardize.

dfmax

Limit the maximum number of variables in the model. Useful when the dimension of cov2 is high.

pmax

Limit the maximum number of variables ever to be nonzero.

resample

Methods for calculating p-values. The default is the fully asymptotics-based method ("asy"). ‘asy-boot’ stands for asymptotics-based method but using parametric bootstrap to calculate the mean and variance of the test statistics. ‘boot’ stands for the fully bootstrap-based method.

bandwidth

Optimal bandwidth for ‘asy’ method.

Value

A list object, Ts : test statistics for the iSPU tests (in the order of the specified pow) and finally for the aSPU test. pvs : p-values for the iSPU and aiSPU tests.

Author(s)

Chong Wu and Wei Pan

References

Wu, C., Xu, G., Shen, X., & Pan, W. (2020+). A Regularization-Based Adaptive Test for High-Dimensional Generalized Linear Models, Submitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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)

X = dat$X
Y = dat$Y

cov = NULL
X.tmp = X
cov2 = X.tmp[,1:(p/2)]
X = X.tmp[,(p/2 + 1):p]
aispu(Y, X,cov = NULL, cov2, pow = c(1:6, Inf), 
model= "gaussian",penalty = "tlp", n.perm = 10,resample = "boot")

#aispu(Y, X,cov = NULL, cov2, pow = c(1:6, Inf), 
#model= "gaussian",penalty = "tlp", n.perm = 10,resample = "asy")

#aispu(Y, X,cov = NULL, cov2, pow = c(1:6, Inf), 
#model= "gaussian",penalty = "tlp", n.perm = 10,resample = "asy-boot")

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