1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 /* senic3.sas */
75
76 %include '/home/u1407221/441s24/SAS02/senicread.sas';
NOTE: Format YESNOFMT is already on the library WORK.FORMATS.
NOTE: Format YESNOFMT has been output.
NOTE: Format REGFMT is already on the library WORK.FORMATS.
NOTE: Format REGFMT has been output.
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 242.96k
OS Memory 32420.00k
Timestamp 12/26/2023 10:01:03 PM
Step Count 45 Switch Count 0
Page Faults 0
Page Reclaims 18
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 32
146 title2 'Explore with Elementary tests';
147
NOTE: The infile '/home/u1407221/441s24/SAS02/openSENIC2.data.txt' is:
Filename=/home/u1407221/441s24/SAS02/openSENIC2.data.txt,
Owner Name=u1407221,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=21Dec2023:11:37:19,
File Size (bytes)=8585
NOTE: 100 records were read from the infile '/home/u1407221/441s24/SAS02/openSENIC2.data.txt'.
The minimum record length was 83.
The maximum record length was 83.
NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line):(Column).
3 at 112:16 3 at 114:44 2 at 115:43
NOTE: The data set WORK.SENIC has 100 observations and 18 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 676.43k
OS Memory 32936.00k
Timestamp 12/26/2023 10:01:03 PM
Step Count 46 Switch Count 3
Page Faults 0
Page Reclaims 132
Page Swaps 0
Voluntary Context Switches 27
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
148 proc corr;
149 title3 'Correlations';
150 var census -- infpercent quality -- w;
151
152 /* Equivalent to
153 census nbeds nurses lngstay age xratio culratio infpercent
154 quality mschool nc ne s w
155 The nomiss option would yield casewise deletion of missing values.
156 To get correlations of set A with set B, you could do something like
157 proc corr;
158 var a1 a2 a3;
159 with b1 b2 b3 b4;
160 */
161
162 /* proc plot is old fashioned -- line printer grahics!
163 proc plot;
164 title3 'Scatterplot';
165 plot quality * infpercent;
166 */
167
NOTE: PROCEDURE CORR used (Total process time):
real time 0.25 seconds
user cpu time 0.26 seconds
system cpu time 0.00 seconds
memory 4622.34k
OS Memory 33960.00k
Timestamp 12/26/2023 10:01:03 PM
Step Count 47 Switch Count 1
Page Faults 0
Page Reclaims 315
Page Swaps 0
Voluntary Context Switches 8
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 96
168 proc sgplot;
169 title3 'Scatterplot with least-squares line';
170 reg x=quality y=infpercent;
171
172 proc sgscatter;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.21 seconds
user cpu time 0.09 seconds
system cpu time 0.02 seconds
memory 20313.40k
OS Memory 51880.00k
Timestamp 12/26/2023 10:01:03 PM
Step Count 48 Switch Count 2
Page Faults 0
Page Reclaims 5451
Page Swaps 0
Voluntary Context Switches 304
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 1240
NOTE: There were 100 observations read from the data set WORK.SENIC.
173 title3 'Scatterplot matrix';
174 matrix census -- infpercent quality;
175
176 proc sgplot;
NOTE: PROCEDURE SGSCATTER used (Total process time):
real time 1.59 seconds
user cpu time 0.42 seconds
system cpu time 0.02 seconds
memory 6995.78k
OS Memory 59308.00k
Timestamp 12/26/2023 10:01:05 PM
Step Count 49 Switch Count 2
Page Faults 0
Page Reclaims 4441
Page Swaps 0
Voluntary Context Switches 352
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 8704
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: Some of the tick values have been thinned.
NOTE: There were 100 observations read from the data set WORK.SENIC.
177 title3 'Number of beds and infection risk';
178 reg x=nbeds y=infpercent;
179
180 proc sgplot;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.26 seconds
user cpu time 0.16 seconds
system cpu time 0.01 seconds
memory 4123.68k
OS Memory 59360.00k
Timestamp 12/26/2023 10:01:05 PM
Step Count 50 Switch Count 2
Page Faults 0
Page Reclaims 1252
Page Swaps 0
Voluntary Context Switches 283
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 1416
NOTE: There were 100 observations read from the data set WORK.SENIC.
181 title3 'Number of beds and infection risk: By med school affiliation';
182 scatter x=nbeds y=infpercent / group = mdschl;
183
184 /* Need ods graphics to set options (plotting symbols) */
185 ods graphics on / attrpriority=none;
186 proc sgplot; /* With clearer plotting symbols */
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.15 seconds
user cpu time 0.06 seconds
system cpu time 0.01 seconds
memory 3090.53k
OS Memory 57772.00k
Timestamp 12/26/2023 10:01:05 PM
Step Count 51 Switch Count 3
Page Faults 0
Page Reclaims 580
Page Swaps 0
Voluntary Context Switches 566
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 784
NOTE: There were 100 observations read from the data set WORK.SENIC.
187 title3 'Number of beds and infection risk: By med school affiliation';
188 styleattrs datasymbols=(Circle SquareFilled);
189 scatter x=nbeds y=infpercent / group = mdschl ;
190 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.14 seconds
user cpu time 0.06 seconds
system cpu time 0.01 seconds
memory 3261.59k
OS Memory 57772.00k
Timestamp 12/26/2023 10:01:05 PM
Step Count 52 Switch Count 2
Page Faults 0
Page Reclaims 552
Page Swaps 0
Voluntary Context Switches 556
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 752
NOTE: There were 100 observations read from the data set WORK.SENIC.
191 ods graphics / reset;
192
193 /* Tried Region and it was not useful */
194
195 proc corr;
196 title3 'Just hospitals with med school affiliation';
197 where mdschl = 'Yes';
198 var nbeds infpercent;
199
NOTE: PROCEDURE CORR used (Total process time):
real time 0.03 seconds
user cpu time 0.03 seconds
system cpu time 0.00 seconds
memory 1926.68k
OS Memory 57004.00k
Timestamp 12/26/2023 10:01:05 PM
Step Count 53 Switch Count 1
Page Faults 0
Page Reclaims 94
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 24
200 proc reg plots=none; /* Suppress diagnostic plots for now*/
201 title3 'Simple regression (One explanatory variable)';
202 model infpercent = nurses;
203 /* Can do lots of analyses at once by giving a list of response variables. */
204
205
NOTE: PROCEDURE REG used (Total process time):
real time 0.03 seconds
user cpu time 0.03 seconds
system cpu time 0.00 seconds
memory 2483.87k
OS Memory 58816.00k
Timestamp 12/26/2023 10:01:05 PM
Step Count 54 Switch Count 2
Page Faults 0
Page Reclaims 305
Page Swaps 0
Voluntary Context Switches 25
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 72
206 proc ttest;
207 title3 'Less Risk at Hospitals with Med School Affiliation?';
208 class mdschl;
209 var infpercent;
210
NOTE: PROCEDURE TTEST used (Total process time):
real time 0.50 seconds
user cpu time 0.22 seconds
system cpu time 0.09 seconds
memory 10247.43k
OS Memory 63948.00k
Timestamp 12/26/2023 10:01:06 PM
Step Count 55 Switch Count 49
Page Faults 0
Page Reclaims 26554
Page Swaps 0
Voluntary Context Switches 1276
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 1872
211 proc freq;
212 title3 'Relationship between region and medical school affiliation';
213 tables mdschl*region / norow nopercent chisq;
214 /* Can do lots of analyses at once with syntax like
215 tables (var1 var2 var3) * (item1-item15); */
216
NOTE: There were 100 observations read from the data set WORK.SENIC.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 1645.68k
OS Memory 59312.00k
Timestamp 12/26/2023 10:01:06 PM
Step Count 56 Switch Count 5
Page Faults 0
Page Reclaims 190
Page Swaps 0
Voluntary Context Switches 38
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 552
217 proc freq;
218 title3 'With expected frequencies';
219 tables mdschl*region / norow nopercent chisq expected;
220
NOTE: There were 100 observations read from the data set WORK.SENIC.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.03 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 1184.12k
OS Memory 59312.00k
Timestamp 12/26/2023 10:01:06 PM
Step Count 57 Switch Count 5
Page Faults 0
Page Reclaims 189
Page Swaps 0
Voluntary Context Switches 32
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 552
221 proc glm;
222 title3 'Regional differences in average infection risk?';
223 class region;
224 model infpercent = region;
225 means region;
226
227 /* Could get the means from proc means, with no extra boxplots */
228
NOTE: PROCEDURE GLM used (Total process time):
real time 0.31 seconds
user cpu time 0.17 seconds
system cpu time 0.02 seconds
memory 4700.71k
OS Memory 60860.00k
Timestamp 12/26/2023 10:01:06 PM
Step Count 58 Switch Count 3
Page Faults 0
Page Reclaims 1235
Page Swaps 0
Voluntary Context Switches 993
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 1200
229 proc means;
230 class region;
231 var infpercent;
232
233
NOTE: There were 100 observations read from the data set WORK.SENIC.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.02 seconds
user cpu time 0.02 seconds
system cpu time 0.01 seconds
memory 8946.37k
OS Memory 67004.00k
Timestamp 12/26/2023 10:01:06 PM
Step Count 59 Switch Count 1
Page Faults 0
Page Reclaims 2030
Page Swaps 0
Voluntary Context Switches 21
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
234 proc glm plots=none;
235 title3 'Check regional differences in all quantitative variables';
236 class region;
237 model census -- infpercent quality = region;
238 means region;
239 run;
NOTE: PROCEDURE GLM used (Total process time):
real time 0.32 seconds
user cpu time 0.32 seconds
system cpu time 0.00 seconds
memory 1899.21k
OS Memory 59320.00k
Timestamp 12/26/2023 10:01:07 PM
Step Count 60 Switch Count 3
Page Faults 0
Page Reclaims 229
Page Swaps 0
Voluntary Context Switches 25
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 536
240
241
242
243
244
245
246 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
258