* Study on the heart rate and the physical activity; option nodate; title "Stepping up the heart rate"; proc format; value hei 0="Low height" 1="High height"; value fre 0="Low freq." 1="Medium freq." 2="High freq"; Data heart; infile "c:\csc423\week9\stepping.txt"; input order block height freq restHR HR; label order = "trial order" block = "block number" height = "step height" freq = "rate of stepping" restHR = "resting heart rate" HR = "heart rate"; format height hei.; format freq fre.; dum_freq1=(freq=1); dum_freq2=(freq=2); proc sort; by freq; /* summary statistcs for the heart rate by frequency level*/ proc means n mean stddev median q1 q3 min max; by freq; var hr; /* draw side-by-side box plots*/ proc boxplot; plot hr*freq; /* regression analysis - ANOVA model*/ proc reg; model hr=dum_freq1 dum_freq2; test dum_freq2-dum_freq1=0; plot student.*predicted.; plot npp.*student.; run; quit;