Encode capture history
encode_capture.RdEncodes a binary capture history as the integer $$1 + \sum_{i \in S} 2^{i-1},$$ where \(S\) is the set of lists containing the case. Thus 1 represents the intercept or empty set, 2 and 3 represent lists 1 and 2 respectively, and 4 represents the two-list history 12.