Thursday, May 28, 2020

Calculating annual visit using visit date

Hi there!

I am a rather novice Stata user doing an MPH. I am using Stata 15 IC on Windows 10; my data is in long format.

I am trying to classify visits to a clinic using the date of the visit. I am only interested in annual visits, and the way the visits were captured was for all visits, including interim. Visit 1 for all participants is the enrollment visit, then for some participants visit 2 is 12 months after visit 1 (example 294 below) whilst others visit 2 is 6 months after visit 1 (example 295 below). I have tried to look for an answer on forums and videos, but can't find quite the right approach. I thought to calculate the months since visit 1 and then create categories based on that, but can't figure out how to do that either. Please see example of data below. Any assistance would be greatly appreciated.

Array

No comments:

Post a Comment