SAS Workshop Part III SAS procedures and graphs

Department of Computing Services Jie Chen Ph.D. jie.chen@umb.edu March, 2003
3/13/2003 1

Table of Contents
• • • • PROC TTEST PROC TABULATE PROC GLM PROC CHARTS

3/13/2003

2

PROC TTEST
data sample; infile 'a:\sample1.txt'; input age educ $ race sex ptotinc famsize fincome region; run; proc ttest data = sample; class sex; var fincome; run;
3/13/2003 3

Output of t-Test

3/13/2003

4

PROC TABULATE
proc tabulate data = sample; class region; var fincome; table region, fincome*(sum mean); title ‘region, family income’; run;
3/13/2003 5

PROC GLM
proc glm data = sample; class region; model fincome = region ; output out = out1 p = pred1 r = resid1; run;

3/13/2003

6

The output of GLM

3/13/2003

7

Checking Normality Assumption
proc rank data = out1 normal = blom; var resid1; ranks nscore; proc plot ; plot resid1*pred1; plot resid1*nscore; run;

3/13/2003

8

Horizontal Bar Chart
proc chart data = sample; hbar fincome; title 'Bar Chart for Family Invome'; Run;

3/13/2003

9

Vertical Bar Chart
proc chart data = sample; vbar region; title 'Bar Chart for Region'; Run;

3/13/2003

10

Sign up to vote on this title
UsefulNot useful