Description Usage Arguments Details Author(s) References
This function will perform a variant of Removing Unwanted Variation 2-step (RUV2) (Gagnon-Bartsch et al, 2013), where we include a variance inflation parameter in the second step and estimate it by maximum likelihood.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Y |
A matrix of numerics. These are the response variables where each column has its own variance. In a gene expression study, the rows are the individuals and the columns are the genes. |
X |
A matrix of numerics. The covariates of interest. |
ctl |
A vector of logicals of length |
k |
A non-negative integer.The number of unobserved confounders. If not specified and the R package sva is installed, then this function will estimate the number of hidden confounders using the methods of Buja and Eyuboglu (1992). |
cov_of_interest |
A vector of positive integers. The column numbers of the covariates in X whose coefficients you are interested in. The rest are considered nuisance parameters and are regressed out by OLS. |
likelihood |
Either |
limmashrink |
A logical. Should we apply hierarchical
shrinkage to the variances ( |
degrees_freedom |
if |
include_intercept |
A logical. If |
gls |
A logical. Should we estimate the part of the
confounders associated with the nuisance parameters with gls
( |
fa_func |
A factor analysis function. The function must have
as inputs a numeric matrix |
fa_args |
A list. Additional arguments you want to pass to fa_func. |
See vruv4
for a description of the model.
The variances of the non-control genes using the adjustment for
RUV2 are unchanged. The variances for the control genes are the
ones that are inflated. Hence, for this method to adjust the
variances of the genes of interest (the non-control genes) you must
use hierarchical shrinkage of the variances. That is, you must set
limmashrink = TRUE
.
David Gerard
Buja, A. and Eyuboglu, N., 1992. "Remarks on parallel analysis." Multivariate behavioral research, 27(4), pp.509-540. doi: 10.1207/s15327906mbr2704_2
Gagnon-Bartsch, J., Laurent Jacob, and Terence P. Speed, 2013. "Removing unwanted variation from high dimensional data with negative controls." Berkeley: Department of Statistics. University of California. https://statistics.berkeley.edu/tech-reports/820
Gerard, David, and Matthew Stephens. 2021. "Unifying and Generalizing Methods for Removing Unwanted Variation Based on Negative Controls." Statistica Sinica, 31(3), 1145-1166. doi: 10.5705/ss.202018.0345
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.