BookmarkSubscribeRSS Feed
cho16
Obsidian | Level 7

Hello Team,

 

How to get all numeric fields stats details by using PROC MEANS and output should be in SAS dataset (no need report).

Input:

Num1

New_Ques

New_Status_1

new_ Interval

New_Status_2

new_ address

234

13

8

7

14

24

431

20

8

6

14

28

755

36

8

6

13

27

753

28

14

9

13

17

941

28

8

6

14

15

526

33

8

6

14

20

621

46

14

7

13

14

834

29

8

6

14

22

 

 

Output:

Var

Mean

Std

Min

Max

P5

P25

P50

P75

Num1

636.875

231.7717

234

941

234

478.5

234

794.5

New_Ques

29.125

9.948977

13

46

13

24

13

34.5

New_Status_1

9.5

2.77746

8

14

8

8

8

11

new_ Interval

6.625

1.06066

6

9

6

6

6

7

New_Status_2

13.625

0.517549

13

14

13

13

13

14

new_ address

20.875

5.303301

14

28

14

16

14

25.5

2 REPLIES 2
PaigeMiller
Diamond | Level 26

PROC SUMMARY or PROC MEANS will do this. There are examples in the documentation

http://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=proc&docsetTarget=p0f0fjpjeuco...

--
Paige Miller
Reeza
Super User

https://communities.sas.com/t5/General-SAS-Programming/Get-all-character-fields-value-s-length-in-ne...

 

Is there any specific reason you're using multiple ID's here?

 

Or is this a homework question of sorts?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 698 views
  • 0 likes
  • 3 in conversation