func.EM: func.EM

Description Usage Arguments Author(s)

View source: R/em_functions.r

Description

Iteratively estimating scaled parameters and biomass

Usage

1
2
3
4
func.EM(dat, external.perturbation = NULL, ncpu = 1, scaling = 1000,
  dev = Inf, m.init = NULL, max.iter = 30, lambda.iter = 2,
  warm.iter = NULL, lambda.choice = 1, resample = 0, alpha = 1,
  refresh.iter = 1, epsilon = 0.001, debug = FALSE, verbose = TRUE)

Arguments

dat

OTU count/relative abundance matrix (each OTU in one row)

external.perturbation

external perturbation presence matrix (each perturbation in one row, each sample in one column) (Default: NULL)

ncpu

number of CPUs (default: 1)

scaling

a scaling factor to keep the median of all biomass constant (default: 1000)

dev

deviation of the error (for one sample) from the model to be excluded (default: Inf - all the samples will be considered)

m.init

initial biomass values (default: use CSS normalization)

max.iter

maximal number of iterations (default 30)

lambda.iter

number of iterations to run before fixing lambda (default: 2)

warm.iter

number of iterations to run before removing any samples (default: run until convergence and start to remove samples)

lambda.choice

1: use lambda.1se for LASSO, 2: use lambda.min for LASSO, a number between (0, 1): this will select a lambda according to (1-lambda.choice)*lambda.min + lambda.choice*lambda.1se

resample

number of iterations to resample the data to compute stability of the interaction parameters (default: 0 - no resampling)

alpha

the alpha parameter for the Elastic Net model (1-LASSO [default], 0-RIDGE)

refresh.iter

refresh the removed samples every X iterations (default: 1)

epsilon

convergence threshold (in relative difference): uqn of the relative error in biomass changes (default 1e-3)

debug

output debugging information (default FALSE)

verbose

print out messages

Author(s)

Chenhao Li, Gerald Tan, Niranjan Nagarajan


lch14forever/BEEM-static documentation built on Jan. 8, 2020, 11:22 a.m.