run_e_step: Run E step

View source: R/full_em_algo_functs.R

run_e_stepR Documentation

Run E step

Description

Runs the E step of the GLM-EIV EM algorithm. Also, returns the updated value of pi (thereby running a portion of the subsequent M step).

Usage

run_e_step(
  m_fam,
  g_fam,
  m,
  g,
  m_mus_pert0,
  m_mus_pert1,
  g_mus_pert0,
  g_mus_pert1,
  fit_pi,
  use_mrna_modality = TRUE
)

Arguments

m_fam

family object describing mRNA counts

g_fam

family object describing gRNA counts

m

mRNA counts

g

gRNA counts

m_mus_pert0

fitted (or hypothesized) means mu^m(0)

m_mus_pert1

fitted (or hypothesized) means mu^m(1)

g_mus_pert0

fitted (or hypothesized) means mu^g(0)

g_mus_pert1

fitted (or hypothesized) means mu^g(1)

fit_pi

fitted (or hypothesized) value for pi

Details

Ensures that the value of pi in the next M iteration will be less than 0.5. This core function is called in all variants of GLM-EIV (weights/estimates first, full/reduced, etc.).

Value

a list containing (i) the membership probabilities (Ti1s), (ii) the model log-likelihood, and (iii) the new value of pi (computed ahead of the subsequent M step for convenience).


timothy-barry/glmeiv documentation built on Jan. 30, 2024, 3:46 p.m.