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).
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)
An N genes by n arrays matrix of expression data
An n by 1 primary predictor
An n by s known covariate matrix not of primary interest
An n by n rotation matrix such that O pred.prim = (1, 0,...,0)
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
A string which takes values in ("hard","soft"). "hard": hard thresholding in the IPOD algorithm; "soft": soft thresholding in the IPOD algorithm
A logical value, if TRUE
, the signal is sparse and the proportion of non-null genes is small, use IPOD algorithm in Owen and She (2010) to enforce sparsity. If FALSE
, the signal is not sparse, use ridge type penalty to carry out the inference as in Sun,Zhang, Owen (2011). Default to TRUE
A logical value, indicates whether the data has been centered at zero, default to FALSE
A logical value, if TRUE
, will print much information as algorithm proceeds, default to FALSE
A numeric, number of permutation performed using algorithm of Buja and Eyuboglu (1992), default to 50
A numeric, convergence tolerance level, default to 1e-4
A numeric, number of candidate tuning parameter lambda under consideration for further modified BIC model selection, default to 50.
A vector of p-values one for each row of data.
An n by num.fac matrix, estimated latent factors
An N by num.fac matrix, estimated latent loadings
An N by 1 vector, estimated primary effect
An N by 1 vector, estimated noise standard deviation one for each row of data
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.
# NOT RUN {
# }
# 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))
# }
Run the code above in your browser using DataLab