General imputation framework.
ruvimpute( Y, X, ctl, k = NULL, impute_func = em_miss, impute_args = list(), cov_of_interest = ncol(X), include_intercept = TRUE, do_variance = FALSE )
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 | The rank of the underlying matrix. Used by
|
impute_func | A function that takes as input a matrix names
|
impute_args | A list of additional parameters to pass to
|
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. |
include_intercept | A logical. If |
do_variance | A logical. Does |
beta2hat
The estimates of the coefficients of the
covariates of interest that do not correspond to control genes.
betahat_long
The estimates of the coefficients. Those
corresponding to control genes are set to 0.
sebetahat
If do_variance = TRUE
, then these are
the "standard errors" of beta2hat
(but not really).
tstats
If do_variance = TRUE
, then these are
the "t-statistics" of beta2hat
(but not really).
pvalues
If do_variance = TRUE
, then these are
the "p-values" of tstats
(but not really).
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
David Gerard