glmBootstrapStability: Analyze stability of top n coefficients

Description Usage Arguments Value Examples

View source: R/glmBootstrap.R

Description

Resamples the data n.rep times, fits a glm modle using the function glm.fun and records the top n.hit coefficient names. Returns a table with frequencies of features that were among the top n.hit coefficients.

Usage

1
2
3
4
glmBootstrapStability(well.a, well.b, n.rep = 100, n.hit = 20,
  frac.sample = 0.7, seed = 7, glm.fun = "glmnet", norm.feat = "all",
  norm.method = "zScore", norm.sep = FALSE, select.inf = "all",
  n.cores = getNumCores(), ...)

Arguments

well.a

A WellData object for glm analysis.

well.b

A second WellData object for glm analysis.

n.rep

The number of bootstrap repeats.

n.hit

Record this many top coefficients.

frac.sample

Size of the subsample as fraction of all available data.

seed

Seed for reproducible sampling.

glm.fun

The glm function to use.

norm.feat

Which features to normalize. Either a regular expression or "all".

norm.method

How to normalize (see function normalizeMoltenData for details).

norm.sep

Separate data into wells form normalization?

select.inf

Run stability analysis only on "infected", "uninfected" or on "all"?

n.cores

The number of cores to use for bootstrapping.

...

Further arguments to be passed to the glm function. For example using glmnet, the alpha value.

Value

A vector of frequencies for features that were among the top n.hit coefficients.

Examples

1
2
3
4
5
6
wells <- findWells(plates=c("J110-2C", "J104-2D", "J107-2L"),
                   well.names=c("H2", "H6"))
data  <- unlist(getSingleCellData(wells), recursive=FALSE)
a <- cleanData(data[["J110-2C.H2"]], "lower")
b <- cleanData(data[["J110-2C.H6"]], "lower")
test <- glmBootstrapStability(a, b, n.rep=20)

nbenn/singleCellFeatures documentation built on May 23, 2019, 12:24 p.m.