BookmarkSubscribeRSS Feed
kota
Calcite | Level 5

Hello all,

 

I'm trying to create a summary table with kappa values.

I often use "proc tabulate" for making tables.

 

Is there a way to pull out the results of other procedures (like kappa statistics can be calculated by "proc freq"),

and make them appear in tables made by "proc tabulate"??

 

I'm not so used to "ods", however, will ods help me??

3 REPLIES 3
ballardw
Super User

My generic approach to using Proc Tabulate to display pre-calculated values is to make the variables VAR variable and request a statistic such as max or min with a suppressed label. The caution that needs to be used with this approach is that you need to make sure that your class variables always point to a unique value. If the base data has two values for one Class variable crossed with one then you lose (or summarize) the variable.

 

An example:

data example;
   input x y kappa;
datalines;
1 1 .9
1 2 1.3
2 1 1.8
2 2 .02
;
run;

proc tabulate data=example;
   class x y;
   var kappa;
   table x*kappa*(max=''),
         y
         /row=float
   ;
run;

The Row=float suppresses the empty cell that would hold the statistic label.

 

 

kota
Calcite | Level 5

I want to know if there is an approach to "pull out" the results of other procedures,

and like "paste it" in the proc tabulate output.

 

Is this some kind of a macro thing??

Or maybe using ods??

 

Anyway, thank you for your reply!

andreas_lds
Jade | Level 19

proc freq can write the results to a dataset, surely you have read that already in the documentation of proc freq. This dataset, can then be used as input for proc tabulate.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 546 views
  • 0 likes
  • 3 in conversation