Skip to contents

Fits a local regression model with dispersion as a function of total gene counts. Predicted values are the expected dispersion for genes with similar expression levels The initial dispersion estimates are shrunk towards the trend

Usage

correct_theta(
  estimates,
  delta_set = 50,
  N_set = 30,
  thetaFilter = NULL,
  shrinkAll = FALSE
)

Arguments

estimates

Data frame from estim_bbparams()

delta_set

Delta parameter (numeric > 0).

N_set

N parameter (numeric > 0).

thetaFilter

Optional numeric threshold; genes with bb_theta < thetaFilter are excluded. Genes with dispersion below the set threshold are excluded from the shrinking procedure.

shrinkAll

Logical. If TRUE, apply shrinkage to all genes (default FALSE).

Examples

correct_theta(estimates,
delta_set = 50,
N_set = 30,
thetaFilter = 1e-3,
shrinkAll = FALSE)
#> Error: object 'estimates' not found