leapp {leapp} | R Documentation |
latent effect adjustment after primary projection
Description
Adjust for latent factors and conduct multiple hypotheses testing from gene expression data using the algorithm of Sun,Zhang and Owen (2011). Number of latent factors can be chosen by Buja and Eyuboglu (1992).
Usage
leapp (data,pred.prim,pred.covar,
O = NULL, num.fac = "buja", method = "hard", sparse = TRUE,
centered = FALSE, verbose = FALSE, perm.num = 50,
TOL = 1e-4, length.out = 50)
Arguments
data |
An N genes by n arrays matrix of expression data |
pred.prim |
An n by 1 primary predictor |
pred.covar |
An n by s known covariate matrix not of primary interest |
O |
An n by n rotation matrix such that O pred.prim = (1, 0,...,0) |
num.fac |
A numeric or string, number of latent factors chosen. it has default value "buja" which uses Buja and Eyuboglu (1992) to pick the number of factors |
method |
A string which takes values in ("hard","soft"). "hard": hard thresholding in the IPOD algorithm; "soft": soft thresholding in the IPOD algorithm |
sparse |
A logical value, if |
centered |
A logical value, indicates whether the data has been centered at zero, default to |
verbose |
A logical value, if |
perm.num |
A numeric, number of permutation performed using algorithm of Buja and Eyuboglu (1992), default to 50 |
TOL |
A numeric, convergence tolerance level, default to 1e-4 |
length.out |
A numeric, number of candidate tuning parameter lambda under consideration for further modified BIC model selection, default to 50. |
Details
The data for test i should be in the ith row of data. If the rotation matrix O is set to NULL, the function will compute one rotation from primary predictor pred.prim.
Value
p |
A vector of p-values one for each row of data. |
vest |
An n by num.fac matrix, estimated latent factors |
uest |
An N by num.fac matrix, estimated latent loadings |
gamma |
An N by 1 vector, estimated primary effect |
sigma |
An N by 1 vector, estimated noise standard deviation one for each row of data |
Author(s)
Yunting Sun yunting.sun@gmail.com, Nancy R.Zhang nzhang@stanford.edu, Art B.Owen owen@stanford.edu
Examples
## Not run:
## Load data
data(simdat)
#Calculate the p-values
p <- leapp(simdat$data,pred.prim = simdat$g,method = "hard")$p
auc <- FindAUC(p, which(simdat$gamma!=0))
## End(Not run)