Description Usage Arguments Value Author(s) References Examples
It gives p-values of the SPU tests and aSPU test.
1 2 | aSPU_apval(Y, X, cov = NULL, pow = c(1:6, Inf), resample = "boot",
model = "gaussian", n.perm = 5000)
|
Y |
Response. It can be binary or continuous trait. A vector with length n (number of observations). |
X |
Genotype or other data; each row for a subject, and each column for a variable of interest. An n by p matrix (n: number of observations, p: number of predictors). |
cov |
Covariates. An n by q matrix (n: number of observations, q: number of covariates). |
pow |
Gamma set used in SPU test. A vector of the powers. |
resample |
Resample methods. "perm" for residual permutations; "boot" for parametric bootstrap. |
model |
corresponding to the Response. "gaussian" for a quantitative response; "binomial" for a binary response. |
n.perm |
number of permutations or bootstraps. |
A list object, Ts : test statistics for the SPU tests and the aSPU test. pvs : p-values for the SPU and aSPU tests.
Chong Wu and Wei Pan
Chong Wu, Gongjun Xu and Wei Pan, "An Adaptive test on high dimensional parameters in generalized linear models" (Submitted)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | p = 200
n = 100
beta = c(1,3,3)
s = 0.15
non.zero = floor(p * s)
signal.r = 0.02
seed = 1
alpha = c(rep(signal.r,non.zero),rep(0,p-non.zero))
dat = generate_data(seed, n = n, p = p, beta = beta,alpha = alpha)
cov = dat$Z
X = dat$X
Y = dat$Y
aSPU_apval(Y, X, cov = cov, pow = c(1:6, Inf),resample = "perm", model = "gaussian", n.perm = 1000)
# The p-values are similar to the resample based one
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.