This function is the implementation of the two step approach for estimating surrogate
variables proposed by Leek and Storey 2007 PLoS Genetics. This function is primarily
included for backwards compatibility. Newer versions of the sva algorithm are available
through `sva`

, `svaseq`

, with low level functionality available
through `irwsva.build`

and `ssva`

.

1 | ```
twostepsva.build(dat, mod, n.sv)
``` |

`dat` |
The transformed data matrix with the variables in rows and samples in columns |

`mod` |
The model matrix being used to fit the data |

`n.sv` |
The number of surogate variables to estimate |

sv The estimated surrogate variables, one in each column

pprob.gam: A vector of the posterior probabilities each gene is affected by heterogeneity

pprob.b A vector of the posterior probabilities each gene is affected by mod (this is always null for the two-step approach)

n.sv The number of significant surrogate variables

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.