/******************* basicsenic.sas ****************/ /* Elementary tests on SENIC Data */ /***************************************************/ %include '/folders/myfolders/2453f15/senicread.sas'; /* senicread.sas reads data, etc. */ title2 'Elementary tests on SENIC Data'; proc freq; title3 'Use proc freq to do crosstabs with chisquare test'; tables region*medschl / nocol nopercent expected chisq; proc ttest; title3 'T-test: Less risk at Hospitals with Med School Affiliation?'; class medschl; var infrisk age ; proc glm; title3 'One-way anova with proc glm'; class region; model infrisk=region; means region / ; means region/ tukey bon scheffe; proc plot; title3 'Scatterplot'; plot infrisk * nurses infrisk * nurses = medschl; proc corr; title3 'Correlation Matrix'; var stay -- nbeds census nurses service; proc glm; title3 'Simple regression with proc glm'; model infrisk=nurses;