The SAS Output Delivery System and reporting techniques

APA Style Cell Statistics

Reply
New Contributor
Posts: 2

APA Style Cell Statistics

I recently ran into a request (that I have seen before) about putting two statistics into the same cell. Apparently, APA Style requires this type of report that has the N in the same cell as the percent (with the percent in parentheses).

Each cell would look like this: xx,xxx (xx%) using the comma format for the N and the percent format for the percent.

The way I would handle this in the past is create and save the statistics, then, in a data step, convert them to character fields, concatenate them together and then use proc report or proc print to print the report.

My question is, is there a way I can do this directly in any procedure? It would be nice to get this out of proc tabulate without doing the extra data step. Or is there any other more efficient way to do this that I haven't even thought of?
SAS Super FREQ
Posts: 8,868

Re: APA Style Cell Statistics

Hi:
A lot of folks use PROC REPORT directly (with a COMPUTE block) to concatenate the 2 numeric vars into a character var; or they use a combination of DATA step to do the "data massaging" (such as indicating what lines to indent or which lines to bold) and then PROC REPORT to to the report. Some folks (who need more control) use DATA _NULL_ and a custom TABLE template.

If you look at this paper, you can see 3 different types of this report. Generically, I called them "demographic" reports, because this is what my students always called them. There are 2 versions of Example 1 (both use PROC REPORT) on massaged data and 1 version of Example 8 (which uses DATA _NULL_ and a custom TABLE template.)

The paper is here: http://www2.sas.com/proceedings/forum2008/173-2008.pdf
The data and programs are here: http://support.sas.com/rnd/papers/sgf2008/complex_reports.zip

Examine the data for example 1 -- the 2 files have already been "massaged" and the 2 PROC REPORTs for example 1 are expecting data in this structure.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 236 views
  • 0 likes
  • 2 in conversation