Skip to contents

A helper function to compute bonus delay reduction on a alternative.

Usage

dr_bonus(sig, big_t, s_plus_tr_p, s_plus_dur, tr_p, tl_dur)

Arguments

sig

Logical vector indicating whether the choice alternative is signalled.

big_t

Numeric vector of the overall average programmed time to terminal reinforcement from the start of the initial links (excluding time spent in a intertrial interval). See SiGN().

s_plus_tr_p

Numeric vector of terminal reinforcement probabilities for an alternative's \(S^{+}\) terminal link. See s_plus_tr_p().

s_plus_dur

Numeric vector of durations associated with an alternative's \(S^{+}\) terminal link. See s_plus_dur().

tr_p

Numeric vector of overall terminal reinforcement probabilities for the alternative.

tl_dur

Numeric vector of average terminal link durations for the alternative.

Value

A numeric vector representing the bonus delay reduction.

Details

If the alternative is not signalled (sig == FALSE), the bonus is set to 0.

Examples

dr_bonus(
  sig = TRUE,
  big_t = 20,
  s_plus_tr_p = 1,
  s_plus_dur = 10,
  tr_p = 0.2,
  tl_dur = 10
)
#> [1] 16