Hi.
I think this is gonna be a lot of sweat & tears to stick to Tabulate to display your result, because if Tabulate can create crosstabs, they can only contain numeric values -- and superscripting will definitely need text. Plus it will be hard to conditonnally add the superscript in cells.
I tried to create a SAS dataset that would look like the crosstab, and then just display it with the Print procedure.
[pre]
ODS EXCLUDE ALL ; /* turns off printing */
ODS OUTPUT CLDiffs = work.differences ; /* saves results to a SAS dataset */
PROC GLM DATA = sashelp.shoes ;
CLASS region ;
MODEL sales = region ;
MEANS region / TUKEY ;
RUN ; QUIT ;
ODS SELECT ALL ; /* turns on printing */
DATA work.differences ;
SET work.differences ;
row = STRIP(SCAN(comparison, 1, "-")) ; /* will be rows for crosstab */
col = STRIP(SCAN(comparison, 2, "-")) ; /* will be columns for crosstab */
/* and now, the text in each cell for crosstab */
/* with an extra superscript A if significant */
cell = PUT(difference, 8.2) !! IFC(significance=1,"^{super a}", "") ;
RUN ;
/* sort row values */
PROC SORT DATA=work.differences ;
BY row col ;
RUN ;
/* transpose to create the crosstab */
PROC TRANSPOSE DATA=work.differences OUT=work.for_print (DROP=_name_) ;
BY row ;
ID col ;
IDLABEL col ;
VAR cell ;
RUN ;
/* most of the job is done, there is just a matter of cosmetics */
/* save column names to display them in the same order as the rows */
PROC CONTENTS DATA=work.for_print (DROP=row) NOPRINT OUT=work.varNames ;
RUN ;
PROC SQL NOPRINT ;
SELECT STRIP(name) INTO : varList SEPARATED BY " "
FROM work.varNames
ORDER BY 1
;
QUIT ;
/* now print */
OPTION ORIENTATION=LANDSCAPE NODATE NONUMBER ;
ODS PDF FILE="c:\temp\test glm.pdf" NOTOC ;
/* we need to tell SAS that in ^{super a}, ^ is an escape character */
ODS ESCAPECHAR="^" ;
TITLE ;
/* we add a little footnote for comprehension */
FOOTNOTE1 "^{super a}Significant difference" ;
PROC PRINT DATA = work.for_print LABEL NOOBS
STYLE(DATA)=[JUST=RIGHT] ; /* right-align cell contents */
ID row ;
LABEL row="Difference between means" ;
VAR &varList ; /* order columns as rows are orderred */
RUN ;
ODS PDF CLOSE ;
OPTION ORIENTATION=PORTRAIT ;
[/pre]
Does it look like what you want ?
Olivier