R: latent effect adjustment after primary projection
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).
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 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
centered
A logical value, indicates whether the data has been centered at zero, default to FALSE
verbose
A logical value, if TRUE, will print much information as algorithm proceeds, default to FALSE
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