4 Replies Latest reply on Jul 27, 2017 4:23 AM by Mads Plesner

    Longitudinal Data analysis -  how to fixe aggregations on days but aggregate over several days

    Mads Plesner

      Hallo community


      I'm strugling with a longitudinal data problem.


      I've got at data set with many observations over time. The subjects in the data have several events (the observations) with a time stamp each. I need to calculate the total time for each subject from event to the last event. This is easy. But the trouble is that some subjects has events on several days, and the time from the last event one day to the first event the next day should not be included.


      The attached workbook shows the subjects with their events aggregated on days. I need to make a calculation that aggregate totals each day, so that the result for eg subject F is 128 minutes.


      Hope that you'll help me