DATA Step, Macro, Functions and more

Proc Tabulate: Mean Median etc. in the column instead of row

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Proc Tabulate: Mean Median etc. in the column instead of row

Hi,

 

at the moment i have:

Proc Tabulate Data=res.Pseudo_dist_Min;
class HDiag3;
Var Alter_;
Table (N Mean STDDEV Median Min Max)*Alter_*Hdiag3;
run;

 

"Alter_" consists age information (variable of interest) and "Hdiag3" includes diagnoses.

 

and the result is:

Output.jpg

How to convert the result to something like that (diagnoses in the row, N Mean etc. in the column and Alter_ as the variable of interest):

 

       S06.0 S06.1 S06.2 etc

N

Mean

StdDev

etc

 

Thanks a lot ahead!

Mike


Accepted Solutions
Solution
‎09-15-2017 12:57 AM
Respected Advisor
Posts: 4,930

Re: Proc Tabulate: Mean Median etc. in the column instead of row

Try

 

Table (N Mean STDDEV Median Min Max), Alter_*Hdiag3;

PG

View solution in original post


All Replies
Solution
‎09-15-2017 12:57 AM
Respected Advisor
Posts: 4,930

Re: Proc Tabulate: Mean Median etc. in the column instead of row

Try

 

Table (N Mean STDDEV Median Min Max), Alter_*Hdiag3;

PG
Occasional Contributor
Posts: 5

Re: Proc Tabulate: Mean Median etc. in the column instead of row

Thank you!

Sometimes life can be so easy Smiley Happy

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 114 views
  • 0 likes
  • 2 in conversation