The functions SequentialValue
and IndexValue
can be used for bootstrap analysis, or for using an existing set of pre-generated random variates in a model.
IndexValue
returns a value, starting from 1, that increases by 1 in every trial.
SequentialValue
returns a value from a range of input values, in order.
Suppose you have a set of data,
and use the sequential value function.
When you run a simulation, in the first trial the value will be 100; in the second trial, the value will be 102; then 97 in the third trial; then 96; and so on.
Both functions can take a limit - a maximum value in the case of IndexValue
, and a count in the case of SequentialValue
. In both cases if the limit is exceeded, the functions will roll over – starting again from 1 in the case of IndexValue
, or starting from the first value in the set for SequentialValue
.
Similar functions with slightly different properties are
UniformRangeSample
- selects at random from a range of values, without replacement.
ChoiceValue
- selects at random from a range of values with replacement.
WeightedChoiceValue
- the same as ChoiceValue
, but with an additional range representing selection weights.