%newsas(probsolv); /*-------------------------------------------------------------* | Data from a hypothetical experiment concerned with the | | effects of delay of feedback on problem solving performance | *-------------------------------------------------------------*/ title 'Data from Problem Solving Experiment'; data PROBSOLV; label DELAY ='Delay of feedback' Y ='Number of problems solved'; input GROUP $ DELAY @; /* Read Group variables */ do SUBJ = 1 to 10; input Y @; /* read observations */ output; end; list; datalines; A1 0 170 168 142 143 144 145 136 120 128 109 A2 1 155 145 147 136 136 124 124 104 106 94 A3 5 96 82 83 86 86 87 72 77 60 64 ; proc print; id GROUP; by GROUP; *-- Get some summary statistics; proc means n mean std sum uss noprint; by DELAY; var Y; output out=SUMRY n=N mean=MEAN std=STD /* create output */ sum=SUM uss=USS css=CSS; /* dataset with stats*/ proc print data=SUMRY; id DELAY; run; %include goptions; goptions vsize=6in; %boxplot(data=PROBSOLV, /* Boxplots */ class=DELAY,var=Y); %splot(data=PROBSOLV, /* Boxplots */ class=DELAY,var=Y); proc glm data=PROBSOLV; /* Do ANOVA */ class GROUP; model Y = GROUP; run; proc glm data=PROBSOLV; /* Do regression */ model Y = delay delay*delay / ss1 ; run;