How to Create Person Level Summary Metrics

The summary variables that will be calculated here include a description of mean total counts per day, mean counts/min per day, and time above specified intensity thresholds. The minutes above thresholds are calculated both in defined bouts and with accumulation of every minute above threshold.

Sample Code

proc summary data =pam_day;
  by seqn;
  where valid_person= 1 and valid_day= 1 ;
  var tot_dur_mv tot_dur_mv1
      tot_dur_m tot_dur_m1
      tot_dur_v tot_dur_v1
      tot_dur_s1 tot_dur_l1 tot_dur_ls1 tot_dur_nw1
      tot_min_wr tot_cnt_wr;
  output out =valid_days
  mean (tot_dur_mv tot_dur_mv1
      tot_dur_m tot_dur_m1
      tot_dur_v tot_dur_v1
      tot_dur_s1 tot_dur_l1 tot_dur_ls1 tot_dur_nw1
      tot_min_wr tot_cnt_wr)=
      allmean_mv allmean_mv1 
      allmean_m allmean_m1   
      allmean_v allmean_v1   
      allmean_sed1           
      allmean_light1         
      allmean_lifemod1       
      allmean_nonwear1       
      allmean_min_wr       
      allmean_cnt
  sum (tot_min_wr tot_cnt_wr)=all_min_wr all_cnt_wr;
run ;

Apply Labels to Physical Activity Monitor Data Variables

Variables are given a text description using a LABEL statement. One way to do this is by using a SAS data step, as shown below in the sample code from the “PAXMSTR” program. User-defined labels always should be surrounded by single- or double-quotation marks. Below we show labels for the primary summary metrics we will use in further analyses.

Sample Code

data valid_days;
  set valid_days;
  label
  allmean_cnt='Mean total counts per day from all valid days'
  allmean_mv='Mean duration (minutes) of moderate and vigorous activity bouts (8 out of 10 minute bouts) per day from all valid days'
run ;