scomars_probs

scomars_probs(treat, marginal)[source]

Conditional SCOMARS probabilities along a realized two-group path.

SCOMARS (Morris 1979) draws stage i’s chooser so that the running count of second-group choices never strays more than one from its expected count. The probability the second group chooses at stage i + 1 is (p[i+1] - max(0, S_i - F_i)) / (1 - |S_i - F_i|), clipped to [0, 1], where S_i counts second-group choices so far and F_i is the cumulative sum of the marginal probabilities p.

Parameters:
  • treat (ndarray) – Realized path as 0/1 indicators of a second-group choice.

  • marginal (ndarray) – Marginal probability that the second group chooses at each stage.

Returns:

The conditional probability used at each stage.

Return type:

ndarray