/* Lab 5 */ /* Exploratory Analysis */ filename nc url 'http://www.openintro.org/stat/data/nc_sas.csv'; proc import datafile=nc out=nc dbms=csv replace; getnames=yes; guessingrows=max; run; proc means maxdec=2 data=nc; var fage mage weeks visits weight gained; run; proc freq data=nc; tables mature premie marital lowbirthweight gender habit whitemom; run; proc sgplot data=nc; vbox weight / category=habit; run; proc means data=nc mean maxdec=2; class habit; var weight; run; /* Inference */ proc ttest data=nc sides=2 H0=0; class habit; var weight; title "Two-Sample t-test Comparing Birthweights by Smoking Status"; run;