Fig. 2: Simulation workflow.
From: A practical solution to pseudoreplication bias in single-cell studies

A gamma [Γ(α, β)] distribution was fit to the global mean transcript-per-million (TPM) value of each gene and used to obtain a grand mean, μi The variance of the individual-specific means (inter-individual variance) was modeled as a linear function of the grand mean, f1(μi). Using a normal N(μ, σ2) distribution with an expected value of zero and a variance computed by the linear relationship, f1(μi), a difference in means was drawn for each individual in the simulation. This difference was summed with the grand mean to obtain an individual mean, μij. Within-sample dispersion was simulated as a logarithmic function of the inter-individual mean, f2(μij). A Poisson (λ) distribution with a λ equal to the expected number of cells desired for each individual was then used to obtain the count of cells per individual. The probability of dropout was estimated as a gamma distribution. For each cell assigned to an individual, a count, Yijk, was drawn from a negative binomial distribution.