I am trying to generate a count of how many total visits there were in a specific time period using the start date as a reference. There are 400+ observations and 100 visits. Study design: On the start date, participants were expected to return to the clinic at 12 months ± 3 months, 24 months ± 3 months, and 36 months ± 3 months. Data: (example) ID Startdate visit1 visit2 visit3 ... visit100 123 12MAR2009 13MAR2010 2AUG2010 4JUN2012 5DEC2015 456 14MAR2009 16MAR2010 4AUG2010 5JUN2012 10DEC2015 789 16MAR2009 19MAR2010 6AUG2010 6JUN2012 15DEC2015 What I need to know is if a patient has a visit within the range of: 9-15 months from the start date for 12 month visit and 21-27 months from the start date for 24 month visit and 33-39 months from the start date for 36 month visit Using the attached set, this is an example of what the reporting table would look like… 12 month visits 29* 24 month visits 18 36 month visits 10 *This means that there were 29 visits that occurred between 9-15 months from the start date.
... View more