DATA Step, Macro, Functions and more

Proc means output

Reply
Contributor
Posts: 38

Proc means output

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

Respected Advisor
Posts: 2,650

Re: Proc means output

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
Super User
Posts: 22,850

Re: Proc means output

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?

Ask a Question
Discussion stats
  • 2 replies
  • 92 views
  • 0 likes
  • 3 in conversation