Hi All,
Can someone help me figure out if I'm missing a subcommand or using the 'all' feature in proc tabulate inapproriately? I'm creating a table summarizing rates across interactions between a number of student demographic variables. I'm using the 'all' feature to get the subtotals for each demographic feature, which works fine in the SAS output (HTML or classic). But, i'm using the out= feature to output the data to then export to Excel. However, in doing so, the label i apply to 'all' does not come along for the ride, the cells are left blank.
It's obviously not a huge deal to use a data step to populate these cells, but it seems like this is something that's easily avoidable by bringing those labels along. The code i'm using appears as follows:
proc tabulate data=cgraudit order=data out=summary;
class school_id school_year school_name sex ethnic ed lep ec;
var grad_flag;
format grad_flag pmult.;
table school_name=' '*(sex=' '(all={label='Total'}))*(ethnic=' '(all={label='Total'}))*(ed=' '(all={label='Total'}))*(lep=' '(all={label='Total'}))*(ec=' '(all={label='Total'})),
school_year=' '*grad_flag=' '*(mean='%'*f=pmult.)//*misstext='Total'*/;
run;
Thanks,
Jason
The 'Total' is only a value substitue for the class variables.Your original data does not have a value so is missing in the data set.
IF you use a format for the class variables that assigns the text 'Total' for missing values it will appear in the data due to the format. Which should export.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: