I am attempting to creating a data set that collapses a large data set that has multiple entries for each person (identified as FellowID), where the unique observations are identified by ProcID. My ultimate goal is to analyze this data set looking at the volume of entries for each Fellow and assessing predictors that changed the volume (ie year AdminSate etc), so I need to create a single entry for each Fellow ID that includes the year when the volumes happened but an individual variable that summarizes the total volume per ProcDate. I tried considering rangestat (count) ProcID, by(FellowID) but I don't really have an interval and not sure if this will create this volume indicator for me.
input int ProgramID str32 ProgramType str2 AdminState int(FellowID YEARBEGIN YEAREND ProcDate) str7 Role str13 Type str43 category str80 subcategory str101 subcat2 long ProcID float(region COVID)
1020 "Bariatrics/Foregut" "PA" 1951 2016 2017 21001 "Primary" "Laparoscopic" "HPB - Biliary" "Gallbladder" "Cholecystectomy without cholangiogram" 864902 0 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Laparoscopic" "Bariatric" "Sleeve gastrectomy" "n/a" 864913 2 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Laparoscopic" "Bariatric" "Sleeve gastrectomy" "n/a" 864914 2 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Laparoscopic" "Bariatric" "Bariatric procedure, revisional" "Lap-Band Removal w/o Reconstruction" 864915 2 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Endoscopic" "GI Endoscopy" "Endoscopy, upper, diagnostic" "Intraoperative" 864916 2 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Primary" "Laparoscopic" "Abdominal Wall" "Hernia, inguinal" "Repair with mesh" 865334 1 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Teach" "Laparoscopic" "Jejunum/Ileum" "Small bowel feeding tube" "n/a" 865335 1 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Teach" "Laparoscopic" "Jejunum/Ileum" "Small bowel feeding tube" "n/a" 865338 1 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Teach" "Laparoscopic" "GI Endoscopy" "Endoscopy, upper, therapeutic" "With dilatation of stricture"
input int ProgramID str32 ProgramType str2 AdminState int(FellowID YEARBEGIN YEAREND ProcDate) str7 Role str13 Type str43 category str80 subcategory str101 subcat2 long ProcID float(region COVID)
1020 "Bariatrics/Foregut" "PA" 1951 2016 2017 21001 "Primary" "Laparoscopic" "HPB - Biliary" "Gallbladder" "Cholecystectomy without cholangiogram" 864902 0 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Laparoscopic" "Bariatric" "Sleeve gastrectomy" "n/a" 864913 2 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Laparoscopic" "Bariatric" "Sleeve gastrectomy" "n/a" 864914 2 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Laparoscopic" "Bariatric" "Bariatric procedure, revisional" "Lap-Band Removal w/o Reconstruction" 864915 2 0
1230 "Bariatrics" "TX" 2064 2016 2017 21001 "Primary" "Endoscopic" "GI Endoscopy" "Endoscopy, upper, diagnostic" "Intraoperative" 864916 2 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Primary" "Laparoscopic" "Abdominal Wall" "Hernia, inguinal" "Repair with mesh" 865334 1 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Teach" "Laparoscopic" "Jejunum/Ileum" "Small bowel feeding tube" "n/a" 865335 1 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Teach" "Laparoscopic" "Jejunum/Ileum" "Small bowel feeding tube" "n/a" 865338 1 0
1115 "Advanced GI MIS" "OH" 2012 2016 2017 21003 "Teach" "Laparoscopic" "GI Endoscopy" "Endoscopy, upper, therapeutic" "With dilatation of stricture"
Comment