dm 'output; clear; log; clear;'; *options ls=76 ps=55 pageno=1; *** FOR THE SCREEN ***; *options ls=123 ps=41 nodate pageno=1; *** FOR HARD COPIES - Landscape ***; options ls=95 ps=55 nodate pageno=1; *** FOR HARD COPIES - Portrait ***; option formdlim = '_'; OPTIONS FORMCHAR="|----|+|---+=|-/\<>*"; DATA MOM_BABY; informat smoke_status $11.; *NOTE: the "informat" statement above allows the "smoke_status" variable (defined below) to be 11 characters long. What happens if you don't use this statement? Try taking it out and see what happens! (Hint: if you put an asterisk in front of the informat command, SAS will treat the statement as a comment, i.e. not execute it).; INPUT SMOKING BABY_WT MOM_WT; *Just for fun, we define a new variable "smoke_status" which has the names of the smoking groups.; if smoking = "1" then smoke_status="Nonsmoking"; if smoking = "2" then smoke_status="1 Pack/Day"; if smoking = "3" then smoke_status="1+ Pack/Day"; Datalines; 1 3515 65.2 1 3420 58.2 1 3175 48.7 1 3586 65.8 1 3232 73.5 1 3884 68.2 1 3856 69.3 1 3941 69.3 1 3232 59.3 1 4054 73.9 1 3459 56.3 1 3998 70.3 2 3444 62.1 2 3827 72.1 2 3884 72.8 2 3515 49.4 2 3416 54.4 2 3742 63.5 2 3062 61.2 2 3076 51.0 2 2835 44.2 2 2750 63.1 2 3460 63.8 2 3340 65.8 3 2608 59.3 3 2509 51.2 3 3600 80.0 3 1730 60.0 3 3175 74.6 3 3459 68.7 3 3288 69.7 3 2920 62.3 3 3020 65.1 3 2778 49.9 3 2466 46.7 3 3260 61.2 ; PROC PRINT; TITLE 'Smoking Status Baby/Mom Weights from BIO 211'; PROC MEANS n Mean StdDev StdErr; TITLE 'Descriptive Statistics for Smoking Groups: Baby/Mom Weights from BIO 211'; Var BABY_WT MOM_WT; CLASS smoke_status; PROC ANOVA; TITLE 'One factor ANOVA from BIO 211 (with Tukey test)'; CLASS smoke_status; Model BABY_WT = smoke_status; Means smoke_status / Tukey; PROC REG; TITLE 'Simple Linear Regression from BIO 211'; Model BABY_WT=MOM_WT; RUN;