temp_situations: Situation occurrence and resolution
Description
This function simulates a situation, e.g. a conflict, that arises with a certain probability,
generates an impact as long as it persists, and has a certain chance of being resolved.
vector of n numeric values, representing a variable time series, which simulates
the effects of a situation that arises with a probability p_occurrence and disappears again
with a probability p_resolution
Arguments
n
integer; number of values to produce
p_occurrence
chance that a situation (e.g. conflict) occurs (probability btw. 0 and 1)
p_resolution
chance that the situation disappears
(e.g. the conflict gets resolved) (probability btw. 0 and 1)
normal_outcome
output value for vector elements that aren't affected by the
situation (can be subject to random variation, if var_CV_normal is specified).
Defaults to 1.
situation_outcome
output value for vector elements that are affected by the
situation (can be subject to random variation, if var_CV_situation is specified).
Defaults to 0.
var_CV_normal
desired coefficient of variation for 'normal' vector elements (in percent).
Defaults to 0.
var_CV_situation
desired coefficient of variation for elements of the vector
that are affected by the situation (in percent). Defaults to 0.