fit_zi_model {switchde}R Documentation

Fit a zero-inflated model for a single gene

Description

Fits a zero-inflated sigmoidal model for a single gene vector, returning MLE model parameters and p-value.

Usage

fit_zi_model(y, pst, maxiter = 10000, log_lik_tol = 0.001,
  verbose = FALSE)

Arguments

y

Vector of gene expression values

pst

Pseudotime vector, of same length as y

maxiter

Maximum number of iterations for EM algorithm if zero inflation enabled. Default 100

log_lik_tol

If the change in the log-likelihood falls below this for zero inflated EM the algorithm is assumed to have converged

verbose

Print convergence update for EM algorithm

Value

A vector with 6 entries: maximum likelihood estimates for μ_0, k t0, λ, σ^2 and a p-value

Examples

data(synth_gex)
data(ex_pseudotime)
y <- synth_gex[1, ]
fit <- fit_zi_model(y, ex_pseudotime)

[Package switchde version 1.18.0 Index]