Thanks, I think this is almost what is expected. For those asking why I have data for different months, the data was collected over several months, but all subjects have data for 2 weeks only. It is not practical to have all subjects have the same start date. Some will be recruited this month, others next month and so on. Regarding the date format it was meant to be in mmddyy10. format. I also meant to say Var instead of obs. There is a lot of missing data in the table as the observations are meant to be taken daily for two weeks only. Expected table: Subject_ID Date Obs Day 10 01/02/21 1 Day1 10 01/03/21 1 Day2 10 01/04/21 - Day 3 10 01/05/21 2 Day 4 10 01/06/21 - Day 5 10 01/07/21 - Day 6 10 01/08/21 - Day 7 10 01/09/21 - Day 8 etc upto Day 14 11 02/05/21 4 Day1 11 02/06/21 3 Day2 11 02/07/21 2 Day3 etc upto Day 14 12 03/05/21 1 Day 1 12 03/06/21 5 Day 2 I hope this helps.
... View more