Hi everybody! I'm trying to aggregate a variable, between two specific dates for each patient Id. So Imagine I have a database with two columns: Patient ID, Date. I want to calculate the difference between the dates that patient visit a clinic. It's a panel data. I have multiple observations for each patient ID from 2007 to 2017. I want to aggregate each variable's value between specific dates for each patient ID. If that helps, I can you an example; patientID / date 111/20071207 111/20080102 111/20080103 111/20080201 22/20160303 22/20160315 22/20160316 22/20160507 22/20160601 22/20160616 22/20160620 3/20171010 3/20271018 into patientID / date1 / date2/ date3/ date4/ date5/ date6/ date7/ ... 111/20071207/20080102/20080103/20080201/20160507/./... 22/20160303/20160315/20160316/20160620/././././.. 3/20171010/20271018 ./././././ ... Is it impossible to make data like this type? please help me to solve the problem. Thank you!
... View more