One Macro Call to a Table with both Frequency and Summary Elements from a Subject-Level Dataset
Wayne Zhong · 2012
A Subject-Level dataset such as ADSL has one observation per subject with data appropriate to the format, such as demographics, baseline characteristics, certain disposition events, and other one record per subject numeric or character data. Tables summarizing this data corresponding have both frequency and summary statistics sections, and normally the tables are produced in individual sections and assembled together. The code to do each section is not complex, which is why this table is a good candidate for a macro to produce. This paper presents the full code of the macro, built with simplicity of the macro call in mind. The call requires only 3 parameters: the input dataset, a variable used to define table columns, and a list of mixed numeric/character variables, one for each section of the table. Adding optional features allow full control over the table presentation, with the end goal of making the program header the lengthiest section of the program.