sim_meanvar: Mean and variance of the expected number of CFUs in the...

View source: R/sim_meanvar.R

sim_meanvarR Documentation

Mean and variance of the expected number of CFUs in the single mixing stage.

Description

This function provides the mean and variance of the expected number of CFUs in the single mixing stage.

Usage

sim_meanvar(mu, sigma, alpha, k, distribution, n_sim)

Arguments

mu

the average number of CFUs (\mu) in the mixed sample, which is in a logarithmic scale if we use a Lognormal / Poisson lognormal distribution

sigma

the standard deviation of the colony-forming units in the mixed sample on the logarithmic scale (default value 0.8)

alpha

concentration parameter

k

number of small portions / primary samples

distribution

what suitable distribution type we have employed for simulation such as "Poisson-Type A" or "Poisson-Type B" or "Lognormal-Type A" or "Lognormal-Type B" or "Poisson lognormal-Type A" or "Poisson lognormal-Type B"

n_sim

number of simulations

Details

Let N' be the number of colony-forming units in the mixed sample which is produced by mixing of k primary samples and N' = \sum N_i. This function produces a graphical display of the mean and variance changes at each mixing stage. It is helpful to identify the optimal number of revolutions of the mixture, which is a point of mixing that initiates Poisson-like homogeneity.

Value

Mean and variance changes in the single mixing stage.

Examples

mu <- 100
sigma <- 0.8
alpha <- 0.1
k <- 30
distribution <-  "Poisson lognormal-Type B"
n_sim <- 2000
sim_meanvar(mu, sigma , alpha , k, distribution, n_sim)

Mayooran1987/mixingsimulation documentation built on May 12, 2023, 12:36 a.m.