regressFactors: run (e.g.) eBayes(lmFit(assay(x), design)) on columns of...

View source: R/regressFactors.R

regressFactorsR Documentation

run (e.g.) eBayes(lmFit(assay(x), design)) on columns of (e.g.) assay(x)

Description

if y is specified, use that instead of assay(x) but constrain it the same if purify is specified, purify assay(x) before proceeding with the fit(s)

Usage

regressFactors(
  x,
  columns,
  y = NULL,
  how = c("lmFit", "concordance"),
  check = TRUE,
  purify = FALSE,
  purity = NULL,
  betas = FALSE,
  ...
)

Arguments

x

a SummarizedExperiment-like object

columns

colData(x) column names to regress as predictors

y

optional matrix w/ ncols(x) columns (default is assay(x))

how

"lmFit" (default) or "concordance" (survival::concordance)

check

ensure that the selected columns of y are non-NA? (TRUE)

purify

purify x? (default is FALSE, but this can be useful)

purity

if purify == TRUE, a required vector of purities for x

betas

if purify == TRUE, are the factors beta values? (FALSE)

...

additional arguments to lmFit, if how == "fit"

Value

       a fitted model (use topTable on it) or concordance object

See Also

      purify
      limma::lmFit
      limma::topTable
      survival::concordance

ttriche/sesamizeGEO documentation built on Nov. 12, 2023, 5:42 p.m.