This function estimates the number of surrogate variables that should be included in a differential expression model. The default approach is based on a permutation procedure originally prooposed by Buja and Eyuboglu 1992. The function also provides an interface to the asymptotic approach proposed by Leek 2011 Biometrics.

1 2 |

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

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

`method` |
One of "be" or "leek" as described in the details section |

`vfilter` |
You may choose to filter to the vfilter most variable rows before performing the analysis |

`B` |
The number of permutaitons to use if method = "be" |

`seed` |
Set a seed when using the permutation approach |

n.sv The number of surrogate variables to use in the sva software

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.