bernoulli_process: Bernoulli process

View source: R/prefab.R

bernoulli_processR Documentation

Bernoulli process

Description

Simulate a process where individuals in a given from state advance to the to state each time step with probability rate.

Usage

bernoulli_process(variable, from, to, rate)

Arguments

variable

a categorical variable.

from

a string representing the source category.

to

a string representing the destination category.

rate

the probability to move individuals between categories.

Value

a function which can be passed as a process to simulation_loop.


mrc-ide/individual documentation built on Aug. 17, 2024, 2:10 p.m.