Hi all, I'm trying to generate a report of cross-tabulated frequencies. However, one of the categorical variables (language) has a ton of different options. I would like a way for the report to only show the top 4 languages and group the rest into an "other" category. How would I do this? Here's my code so far: PROC REPORT data= nodup_list nowd missing;
column motherdominantlanguage have_phone, (N pctn) Total;
define motherdominantlanguage / group "Language" order=freq descending;
define have_phone / across order = external "Phone Status";
define n / format = 8. "N" ;
define pctn / 'Percent' format=percent7.1 ;
rbreak after / dol skip summarize ;
compute total;
Total = sum(_c2_,_c4_);
endcomp;
title2 "Mother's Language Frequency";
RUN; And here's a sample of my current output: I'd really like to only have 5 language rows: top 4 languages and an other category! Thanks!
... View more