options ls=78;
data class4;
infile
'prac4b.txt';
input sn
school $ motive anx pre post;
sqmotive=sqrt(motive);
lanx=log(anx);
pre3=pre**3;
post3=post**3;
tdiff=(post-pre);
sqtdiff=sqrt(tdiff+5);
run;
proc print data=class4;
run;
proc univariate data=class4 plot normal;
var motive
sqmotive anx lanx pre pre3 post post3 tdiff sqtdiff;
title 'name,
univariate normalizing';
run;
proc chart data=class4;
vbar motive
sqmotive anx lanx pre pre3 post post3 tdiff sqtdiff / levels=15;
title 'name,
histograms of data';
run;
proc means data=class4 n mean std clm alpha=.05;
var sqmotive
lanx sqtdiff;
title 'name,
looking at means and confid limits';
run;
proc sort data=class4;
by school;
run;
proc univariate data=class4 plot normal;
by school;
var motive
sqmotive anx lanx pre pre3 post post3 tdiff sqtdiff;
title 'name,
univariate normalizing when sort by school';
run;
proc chart data=class4;
vbar motive
sqmotive anx lanx pre pre3 post post3 tdiff sqtdiff / levels=15;
title 'name,
histograms of data when sorted by school';
run;
proc means data=class4 n mean std clm alpha=.05;
by school;
var sqmotive
lanx sqtdiff;
title 'name,
means and confid limits when sorting by school';
run;
quit;