ruv_residuals: RUV Residuals

Description Usage Arguments Details Value Author(s) See Also

Description

Calculate the residuals or adjusted data matrix of an RUV2 or RUV4 fit.

Usage

1
ruv_residuals(fit, type=c("residuals", "adjusted.Y"), subset_and_sort=TRUE)

Arguments

fit

The results of a call to ruv_summary.

type

Whether to compute residuals or an adjusted data matrix. Caution; see details below.

subset_and_sort

Whether to subset and sort the features, as in ruv_summary.

Details

This function will return either the residuals or an adjusted data matrix. The residuals are the result of removing all factors (wanted and unwanted), whereas the adjusted data matrix is the result of removing only the unwanted factors.

The residuals can be useful for diagnostics, e.g. in producing a residual RLE plot. The adjusted data matrix may also be useful for diagnostics, but typically should *not* be used for any additional downstream analyses. The adjusted data matrix can suffer from overfitting, which can be severe, especially when k is large, and this can produce artificially "good" results in downstream analyses.

If an adjusted data matrix for use in downstream analyses is desired, see RUVIII.

Value

Either a matrix of residuals, or an adjusted data matrix.

Author(s)

Johann Gagnon-Bartsch

See Also

RUV2, RUV4, ruv_summary, RUVIII


ruv documentation built on Aug. 31, 2019, 1:04 a.m.