sas - 201 Lecture 20: SAS! Lets first start off with some...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
201 Lecture 20: SAS!!!! Let’s first start off with some basic data input with SAS. Open your SAS Stats program. SAS CODE: (columns) data one; input id x; cards ; 1 23 2 43 3 66 4 31 5 28 6 73 7 92 8 19 9 33 10 55 run ; proc print ; run ; SAS OUTPUT: Obs id x 1 1 23 2 2 43 3 3 66 4 4 31 5 5 28 6 6 73 7 7 92 8 8 19 9 9 33 10 10 55
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
202 SAS CODE: (rows) data two; input id x @@; cards ; 1 23 2 43 3 66 4 31 5 28 6 73 7 92 8 19 9 33 10 55 run ; proc print ; run ; proc means ; var x; run ; SAS OUTPUT: Obs id x 1 1 23 2 2 43 3 3 66 4 4 31 5 5 28 6 6 73 7 7 92 8 8 19 9 9 33 10 10 55 The MEANS Procedure Analysis Variable : x N Mean Std Dev Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 10 46.3000000 24.2901443 19.0000000 92.0000000 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ SAS CODE: (rectangle data) data rectangle; input x1 x2 x3 x4; cards ; 10 12 11 1.4 22 12 99 4.3
Background image of page 2
203 15 12 64 3.1 12 5 3 8.9 99 45 66 0.5 run ; proc print ; run ; proc means ; var x1 x2; run ; SAS OUTPUT: Obs x1 x2 x3 x4 1 10 12 11 1.4 2 22 12 99 4.3 3 15 12 64 3.1 4 12 5 3 8.9 5 99 45 66 0.5 The MEANS Procedure Variable N Mean Std Dev Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ x1 5 31.6000000 37.9512846 10.0000000 99.0000000 x2 5 17.2000000 15.8335088 5.0000000 45.0000000 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ SAS CODE: (numeric and alpha numeric) data alpha; input height weight sbp dbp gender $ age race $; cards ; 63 145 135 70 F 32 black 67 132 120 60 F 31 hispanic 60 117 130 80 F 33 white 68 187 140 60 M 26 white run ; proc print ; run ; SAS OUTPUT: Obs height weight sbp dbp gender age race 1 63 145 135 70 F 32 black 2 67 132 120 60 F 31 hispanic 3 60 117 130 80 F 33 white 4 68 187 140 60 M 26 white
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
204 First Example: 1 2 3 4 4 5 6 8 8 9 10 10 10 11 11 11 12 12 12 12 13 13 14 15 16 17 17 18 18 19 19 20 22 23 24 25 29 30 33 37 38 39 40 55 58 77 81 96 102 107 For the above data, let’s find the mean, std dev, quartiles, boxplot
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

sas - 201 Lecture 20: SAS! Lets first start off with some...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online