multi_probability_multinomial_process: Overdispersed multinomial process

Description Usage Arguments Value

View source: R/prefab.R

Description

Simulates a two-stage process where all individuals in a given source_state sample whether to leave or not with a individual probability specified by the DoubleVariable object rate_variable; those who leave go to one of the destination_states with probabilities contained in the vector destination_probabilities.

Usage

1
2
3
4
5
6
7
multi_probability_multinomial_process(
  variable,
  source_state,
  destination_states,
  rate_variable,
  destination_probabilities
)

Arguments

variable

a CategoricalVariable object.

source_state

a string representing the source state.

destination_states

a vector of strings representing the destination states.

rate_variable

DoubleVariable giving individual probability of each individual in source state to leave

destination_probabilities

probability vector of destination states.

Value

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


individual documentation built on Oct. 25, 2021, 9:09 a.m.