How to Use a SAS Macro Designed to Summarize Bouts of Activity at Defined Intensities

After classifying each minute, two macros will process the data to detect and quantify activity of various intensities for each day for each participant. Activity bouts are defined by a specified number of consecutive minutes with intensity count greater than or equal to the relevant intensity threshold. A bout is established when the specified length of consecutive valid minutes are reached.

Description of Macros

The ‘%bouts’ macro sets a bout length of 1 minute so that it accumulates all minutes of a given intensity and does so for all defined intensities and for non-wear time. The activity bout stops when any of the following conditions is met:

  • 1 minute with intensity less than the threshold
  • 1 minute with a missing intensity count
  • the last minute of the day

Bouts of consecutive minutes greater than 1 for any specific intensity level can be calculated by changing the boutperiod= value at the end of the ‘%bouts’ macro.

The second macro, ‘%bouts_8of10’, calculates 10-minute bouts with an allowance for 1 or 2 minutes below the threshold. The allowance will prevent a bout from being terminated by a brief interruption, such as waiting to cross the street while jogging. These bouts are only defined for locomotor moderate, vigorous, and moderate or vigorous intensities. An activity bout starts with a count that is greater than or equal to the threshold. A bout is established when 8 minutes out of a 10 minute window have intensity counts greater than or equal to the threshold. The bout stops when any of the following conditions is met:

  • 3 consecutive minutes with intensity less than the threshold
  • 1 minute with a missing intensity count, or last minute of the day