Just to give you an idea of what I mean if it's not clear; PKid -3 -2 -1 0 1 2 3 total visits 2 2 6 0 6 0 0 0 14 3 3 13 4 15 4 0 0 39 5 2 5 13 1 4 0 0 25 So -3, -2, -1, 0, 1,2,3 are time periods and each id had different frequency of visit during each period, this is only the intervention group (by status variable) How do I take average visits per pkid during each time period in a data step, when the data is in the following long form; pkid visit month2 status 1 1 -3 eligible 1 1 -3 eligible 1 1 -2 eligible 1 1 0 eligible 2 1 -1 intervention 2 1 2 intervention 2 1 3 intervention 2 1 0 intervention
... View more