Beruflich Dokumente
Kultur Dokumente
info@sastechies.com
http://www.sastechies.com
Creating
◦ SAS Tables,
◦ Listings, TLG’s
◦ Basic Statistics Procedures with SAS
◦ Graphs
◦ ODS HTML
◦ Proc Report and Other Utility Procedures
Dimension expressions can also contain operators that you use when
combining elements to produce the table you want.
Commas, one type of operator, separate the dimensions of the table.
SAS Techies 2009 11/02/21 8
Type proc tabulate data=clinic.diabstat;
Type
I II I II Premium
class type sex;
N N N N Sum var totalclaim premium;
3.0
3.00 17.00 3359.15 table type;
0 17.00
table type premium;
Premium table type,premium;
Sum
table type,premium,sum;
run;
Type
I 312.65
Two-dimensional tables always
II
have row and column headings;
3046.50
Type I
Sum Type II one-dimensional tables only
Premiu 312.6
Sum have column headings.
m 5 Premiu 3046.5
m 0
table sex,actlevel*age*max;
proc format;
value $actfmt 'LOW'='(1) Low'
'MOD'='(2) Moderate'
'HIGH'='(3) High';
table type,fee*sex*pctsum<type>;
60 2 22.22 6 66.67
66 2 10.00 6 30.00
Cumulativ Cumulativ
eigh Frequenc Percen e e
Cumulative Cumulative t y t Frequ Perce
Frequ Perce ency nt
Height Frequency Percent ency nt
64 3 15.00 3 15.00
Medium 8 40.00 8 40.00
61 2 10.00 5 25.00
Short 7 35.00 15 75.00
65 2 10.00 7 35.00
Tall 5 25.00 20 100.00
66 2 10.00 9 45.00
> 180 0
0.00
3
15.00
5
25.00
8
40.00 a PROC FREQ step.
0.00 37.50 62.50
0.00 37.50 100.00
Total 7 8 5 20
35.00 40.00 25.00 100.00
proc format;
value wtfmt
low-139='< 140' 140-180='140-180' 181-high='> 180';
value htfmt low-64='< 5''5"' 65-70='5''5-10"' 71-high='> 5''10"'; run;
proc freq data=clinic.diabetes;
tables weight*height;
format weight wtfmt. height htfmt.;
run; SAS Techies 2009 11/02/21 21
Frequency Table 1 of Weight by Height
Controlling for Sex=F
Perce
nt Height
Row
Pct 5'5-
Col 1
< 5'5" > 5'10"
Pct 0
"
Weight Total
< 140 2 0 0 2 levels v
1
8.
0.
00
0.
00
1
8
tables sex*weight*height;
1
8
0.
00
0.
00 1
. ^ ^
1 0. . 8 rows + columns = two-way tables
0 00
0.
0
0 proc freq data=clinic.diabetes;
2
8.
tables sex*weight*height;
Frequency Table 2 5of Weight by Height
7
format weight weight. height height.; run;
Controlling for Sex=M
Perce 5 4 0 9
140-
nt 4 Height
36 0. 8
18
Row 5. .3 00 1
0 4
Pct 5'5-6 0. .
Col 5 441 00 8
< 5'5"5 .4 > 5'10". 2
Pct 5. 04
5 10 "
Weight Total
6 0.
< 140 7
0 00 0 0 0
1.
0. 0. 0. 0
4
0 00 00 .
3
0 . . 0
. 0. 0. 0
> 180 0
. 00 0 0
00 0
0. 0. 0. 0
0 00 00 . SAS Techies 2009 11/02/21 22
0 . . 0
Cumulative Cumulative
Freque Percen
Sex Weight Height Frequency Percent ncy t
F < 140 < 5'5" 2 10.00 2 10.00