sva (version 3.20.0)

irwsva.build: A function for estimating surrogate variables by estimating empirical control probes

Description

This function is the implementation of the iteratively re-weighted least squares approach for estimating surrogate variables. As a buy product, this function produces estimates of the probability of being an empirical control. See the function empirical.controls for a direct estimate of the empirical controls.

Usage

irwsva.build(dat, mod, mod0 = NULL, n.sv, B = 5)

Arguments

dat
The transformed data matrix with the variables in rows and samples in columns
mod
The model matrix being used to fit the data
mod0
The null model being compared when fitting the data
n.sv
The number of surogate variables to estimate
B
The number of iterations of the irwsva algorithm to perform

Value

sv The estimated surrogate variables, one in each columnpprob.gam: A vector of the posterior probabilities each gene is affected by heterogeneitypprob.b A vector of the posterior probabilities each gene is affected by modn.sv The number of significant surrogate variables