The user input an indicator variable on whether using results from multiple slides: split
The user input features_high: features with high abudance to be run in iter=1
The user input features_all: all features to be run in iter=2
The user input sizefact_start: initial value for size factors
The user input sizefact_BG: size factor for background
The user input threshold_mean: average threshold level
The user input preci2: precision for the background
The user input lower_threshold: lower limit for the threshold
The user input prior_type: empirical bayes prior type, choose from c("equal", "contrast")
The user input sizefactrec, whether to recalculate sizefact, default=TRUE
The user input size_scale: how to scale size factor if sizefactrec=TRUE
The user input sizescalebythreshold: whether to scale the size factor by the threshold_mean in the modeling, default=TRUE
The user input iterations: how many iterations need to run to get final results, default=2,
the first iteration apply the model only on features_high and construct the prior then refit the model using this prior for all genes.
The user input covrob: whether to use robust covariance in calculating covariance. default=FALSE
The user input preci1con: constant for preci1
The user input cutoff: cutoff for calculating the precision matrix for regression coefficients
The user input confac: contrast factor in the precision matrix for regression coefficients
The function outputs a list of following objects
design matrix: X = X
parameters estimated in iter 1: para0
parameters estimated in iter 2: para
size factor for signal: sizefact
size factor for background: sizefact0,
preci matrix for regression coefficients, preci1,
Information matrix: Im0,
Information matrix: Im,
vector of whether model has converged in iter=1: conv0, 0=converged, 1=not converged
vector whether model has converged in iter=2: conv, 0=converged, 1=not converged
features with high abundance to be run in iter=1: features_high
The user input object: DE model, output by fitNBthDE or fitNBthmDE
The user input test: statistical test, choose from c("two-sided", ">", "<")
The user input method: contrasts methods, only matrix of contrast vector is allowed for now, default=diag(1,ncol(object$X)), i.e. testing the regression coefficients
The user input baseline: testing baseline, default=0.