Hi everyone, I believe I have a relatively simple question, but I'm new to SAS so its been a bit daunting to try and figure it out. I have about 100 datasets that each contain a single column with step counts collected by a study subject for over one year (one observation/day, i.e. about 365 observations per person). I would like to take the average of the step counts every 30 days, and label each of these 30-day averages as T1, T2, T3 etc. I would then like to have a dataset that contains the T1, T2, T3 etc.. step average for each participant. Not all participants were good about recording their steps every day so there are some missing values. For each 30 day block, I would like to calculate compliance (#completed/30x100). Therefore I am hoping to go from many datasets that have approx 365 step count recordings in a single column to something like this: ID T1_avg T2_avg T3_avg ..... T1_compliance T2_compliance T3_compliance ...... 1 2 3 4 5 6 Some participants went beyond the 1 yr mark and others finished earlier so not everyone has exactly 365 days of steps. Therefore, I may have some participants with T14, T15, T16, and even some with T17. Would anyone be able to help with this? I really appreciate any tips you might have!
... View more