Description Usage Arguments Value Author(s)
QR rotation to independent models.
1 2 3 4 5 6 7 8 9 10 11 |
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. |
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. |
include_intercept |
A logical. If |
limmashrink |
A logical. Should we apply hierarchical
shrinkage to the variances ( |
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. |
do_factor |
A logical. Should we do the factor analysis or just rotation? |
A list that contains some of the following elements.
betahat_ols
: The OLS estimates of the coefficients of interest.
Q
: The Q from the QR decomposition of X
R11
: The top left element of the R matrix from the QR decomposition of X
R12
: The top right element of the R matrix from the QR decomposition of X
R22
: The bottom right element of the R matrix from the QR decomposition of X
Y1
: The rows of the rotated Y matrix that correspond to the uninteresting covariates in X
Y2
: The rows of the rotated Y matrix that correspond to the interesting covariates in X
Y3
: The rows of the rotated Y matrix that correspond to the nullspace of X
k
: The number of latent factors. Estimated with num.sv
if not provided in the function arguments.
X
: The provided X
matrix. This might differ from the original X
matrix up to a permutation of the columns. The interesting covariates are placed at the end of X
and the uninteresting covariates are placed at the start of X
.
Y_tilde
: The rotated Y matrix.
alpha
: The estimates of the coefficients of the unobserved confounders. Only returned if do_factor = TRUE
Z3
: The estimates of the unobserved confounders (third part). Only returned if do_factor = TRUE
sig_diag
: The estimates of the column-specific variances (NOT standard deviations). A vector. Only returned if do_factor = TRUE
prior_df
: The estimated prior degrees of freedom. Returns NULL if limmashrink = FALSE
. Only returned if do_factor = TRUE
David Gerard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.