Let’s say I own a restaurant in an area with only three families. each with four members. Let’s identify each family by a group of four letters that represent each person with a family. Family 1 A B C D Family 2 E F G H Family 3 I J K L Each night, for eight nights, two or three people arrive at the restaurant. Guests are recorded in the order they enter the restaurant. All guests on any given night are from ONE family only. The resulting observation set for all eight nights is: A B C E G . D B . K L . I K . F G . E G H L J . Now I ask, is there are a way to reconstruct the families by grouping letters into complete families given the eight observations? There is a clear algorithm but it is unclear if it is possible in SAS. I have no reason to doubt that it is. The algorithm involves setting the first observation as a family and comparing it to all other observations. If there are any shared people, then all people in those observations are aggregated to expand the original family. Then repeat for for each observation.
... View more