X_decomp {randRotation} | R Documentation |
Full QR decomposition of the design matrix X
. No argument checks are
performed, see Details
.
X_decomp(X = NULL, coef.d = seq_len(ncol(X) - 1))
X |
Design matrix as generated by
|
coef.d |
Non- |
The design matrix X
is QR decomposed into X = Xq Xr
.
By performing a full QR decomposition, Xq
is automatically extended to
a full basis. Xq
is further split into Xd
and Xhe
, where
Xd
corresponds to columns coef.d
(non-H0
or
non-Null-Hypothesis columns) and Xhe
correspond to all other columns
(H0
and error columns), see initRandrot
.
No argument checks are performed for reasons
of performance as this function is called frequently by
initRandrot
when weights are used.
See (Hettegger et al. 2021) and (Langsrud 2005) for further details.
A list
object containing matrices Xd
,
Xhe
and rank of the qr decomposition.
Peter Hettegger
Hettegger P, Vierlinger K, Weinhaeusel A (2021).
“Random rotation for identifying differentially expressed genes with linear models following batch effect correction.”
Bioinformatics.
ISSN 1367-4803, doi: 10.1093/bioinformatics/btab063.
Langsrud O (2005).
“Rotation tests.”
Statistics and Computing, 15(1), 53–60.
ISSN 09603174, doi: 10.1007/s11222-005-4789-5.
design <- cbind(1, rep(0:1, 5)) X_decomp(design)