Prefit the poisson mash model to get an initial estimate of model parameters including mu, psi2 and rho.

pois_mash_prefit(
  data,
  ruv = FALSE,
  Fuv,
  update.mu = TRUE,
  verbose = FALSE,
  init = list(),
  control = list()
)

pois_mash_prefit_control_default()

Arguments

data

“pois.mash” data object, typically created by calling pois_mash_set_data.

ruv

Logical scalar indicating whether to account for unwanted variation. If ruv = TRUE, Fuv must be provided.

Fuv

J x D matrix of latent factors causing unwanted variation, with features as rows and latent factors as columns.

update.mu

A logical scalar indicating whether to update gene-specific means mu. If update.mu = FALSE, initial mu must be provided in init.

verbose

Logical scalar indicating whether to print ELBO at each iteration.

init

List of initial values for model parameters which could be empty.

control

List of control parameters with one or more of the following elements: “maxiter”, maximum number of iterations; “maxiter.q”, maximum number of inner-loop iterations to update variational parameters at each iteration; “tol.stop”, tolerance for assessing convergence of prefit, as measured by absolute change in ELBO; “tol.q”, relative tolerance for assessing convergence of variational parameters at each iteration; “tol.rho”, tolerance for assessing convergence of effects corresponding to unwanted variation. Any named components will override the default optimization algorithm settings (as they are defined by pois_mash_ruv_prefit_control_default).

Value

A list containing initial estimates of model parameters.