01-24-2018 10:01 AM
This table contains headers and sub-headers.
01-24-2018 10:27 AM
You really should show what your table should look like. Descriptions of moving things isn't the easiest without examples.
If you are attempting to create spanning headers inside the body of Proc Tabulate output I think you may be out of luck. The only thing Tabulate wants to "span" over multiple columns or rows are Class variables. Since the variables you are calling "headers" are basically the labels of analysis variables that is not going to be easy. You don't mention it but I suspect you getting an error message like:
ERROR: There are multiple analysis variables associated with a single table cell in the following nesting
which is the effect of having two or more VAR variables nested.
What I think you are describing may be possible if you summarize the data first then use the Report Writing Interface which allows creating interesting tables from a data step.
Or possible involves additional variables and/or steps and semi-wicked data step code prior to proc tabulate. But with out data or an actual desired appearn
01-24-2018 01:31 PM
The table headers are attached to this post, if this helps.
Is that what you are currently getting or what you want? I have to assume is what you are currently getting.
If you want header3 or header4 to span then you will have to do something like create a new variable for each to use as a class variable, have a single value of your header text for that variable and suppress the label of that variable with the classvar=' '. Then you will have to modify the table statement so that you have
header3classvar =' '*(vg2 vg3 vg4) header4classvar=' '*(n2 n3 n4) or similar
The class variables used for spanning would NOT be used in the other position (most likely) that you show header3 and header4 text.