Hi, I thought I'd change the discussion a little... when I run this code I get "merged" cells in the first row.. how can I get rid of the merged feature. Se diagram below of what I get, and my proc tabulate code:
This is the code I use from a Proc Tabulate:
TABLE Transaction_Type*CI1_T,N pctn<CI1_T all> /rts=35;
Thanks
Hi:
That "merged cell" is a side effect of how TABULATE operates. The big empty "box" at the intersection of your row headers (TRANSACTION_TYPE and CI1_T) and your column headers (N and PCTN) causes the row headers to be placed in the first "row", thus causing what you show. Here's an interesting blog post about how this is one reason why folks switch over to PROC REPORT.
http://blogs.sas.com/content/sasdummy/2010/10/22/proc-report-versus-tabulate-two-sas-heavyweights/
With only 1 variable in the ROW dimension, you can put a variable value into the big empty box. Or, you can put a string of your own choosing up in the BOX area. In either of those cases, you can suppress the header for TRANSACTION_TYPE and CI1_T and it would make the whole row go away. (I took out the RTS= option because your output looks like PDF and PDF essentially ignores the RTS option.
cynthia
TABLE Transaction_Type=' '*CI1_T=' ',N pctn<CI1_T all> /row=float
box='Transaction and CI1_T';
Thanks Cynthia, worked perfectly... would you know how I can make the percent not be multiplied by 100. and show as 0.352 rather than 35.2 ? Thanks
I posted a response to the latter question under a second thread that was started on the topic of podarum's second question. A solution, that worked, was to created and apply a format, namely:
data fractions;
format label 4.3;
retain fmtname 'fraction' type 'n';
do start=0 to 100 by .1;
end=start+0.0999999999;
label=start/100;
output;
end;
run;
proc format cntlin=fractions;
run;
You need another format to display it.
proc format; picture per low-high='9.99' (mult=1); run; proc tabulate data=sashelp.class ; class sex age; table sex=''*(age='' all),n pctn*format=per. ; run;
Ksharp
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.