Greetings Statalist users. I need to sum "days8dtotal" per patient across unique "stay". Based on descriptive merged data, many patients will have many rows of data with identical data. The following is a cut of these 2 variables for one patient. Stay = 1 has 21 rows of data and Stay=2 only 1 row. I really just need an effective way to sum total days for each patient across stays. So, for this particular patient, 2 distinct stays within 8D for a total of 13 days in 8D. Thanks.
days8dtotal stay
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
5 2
days8dtotal stay
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
5 2
Comment