Hello all,
I have a table view I am creating with proc tabulate via the following code:
proc tabulate data=merged_field_qrm_rates_plot_zoom;
title "&Prodcat";
class 'date'n;
var FB_short_rate FB_Rate FS_short_rate FS_Rate field_rate_FB field_rate_FS;
table (FB_short_rate='Fed-Base Short Rate'
FB_Rate='Product Yield - Fed-Base Scenario: QRM Model'
field_rate_FB='Product Yield - Fed-Base Scenario: Field Forecast'
FS_short_rate='Fed-Stress Short Rate'
FS_Rate='Product Yield - Fed-Stress Scenario: QRM Model'
field_rate_FS='Product Yield - Fed-Stress Scenario: Field Forecast')
*(format=comma20.2),date;
where prodcat="&Prodcat" and date in ('31DEC2012'd, '31MAR2013'd, '30JUN2013'd, '30SEP2013'd,'31DEC2013'd,
'31MAR2014'd, '30JUN2014'd, '30SEP2014'd,'31DEC2014'd,
'31MAR2015'd, '30JUN2015'd, '30SEP2015'd,'31DEC2015'd,
'31MAR2016'd);
run;
And it looks as such:
Fed-Base Short Rate | Sum | 0.51 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.66 | 0.66 | 0.76 | 1.06 | 1.26 | 1.46 | 1.76 | 2.01 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product Yield - Fed-Base Scenario: QRM Model | Sum | 0.24 | 0.27 | 0.30 | 0.32 | 0.33 | 0.33 | 0.35 | 0.37 | 0.41 | 0.50 | 0.62 | 0.74 | 0.88 | 1.03 |
Product Yield - Fed-Base Scenario: Field Forecast | Sum | . | 0.23 | 0.23 | 0.23 | 0.23 | 0.25 | 0.26 | 0.29 | 0.36 | 0.52 | 0.68 | 0.82 | 1.03 | . |
Fed-Stress Short Rate | Sum | 0.51 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 | 0.56 |
Product Yield - Fed-Stress Scenario: QRM Model | Sum | 0.24 | 0.27 | 0.30 | 0.32 | 0.33 | 0.33 | 0.33 | 0.33 | 0.33 | 0.33 | 0.33 | 0.33 | 0.33 | 0.33 |
Product Yield - Fed-Stress Scenario: Field Forecast | Sum | . | 0.23 | 0.23 | 0.23 | 0.22 | 0.22 | 0.21 | 0.21 | 0.21 | 0.21 | 0.20 | 0.20 | 0.20 | . |
This is all very good, except it is automatically adding this 'Sum' column. Is there anyway that I can just remove that sum column ?? The column variables I've defined on the far left are the appropriate description for the values, they are not sums.
Thanks!!
-Ryan
I think you want to remove the SUM label. Since you don't explicitly ask for a statistic it is defaulting to a sum as the requested statistic, you might want to add:
Keyword sum='';
You can modify or suppress statistic labels when included explicitly in the table statment by
sum='label text'
or
mean='' (that is two single quotes, not a double quote)
I think you want to remove the SUM label. Since you don't explicitly ask for a statistic it is defaulting to a sum as the requested statistic, you might want to add:
Keyword sum='';
You can modify or suppress statistic labels when included explicitly in the table statment by
sum='label text'
or
mean='' (that is two single quotes, not a double quote)
I tried all 3 of your suggestions, but receive a syntax error for each:
keyword sum='';
_
22
200
ERROR 22-322: Syntax error, expecting one of the following: ;, /, ALL, COLPCTN, COLPCTSUM, CSS, CV, KURTOSIS, LCLM, MAX, MEAN,
MEDIAN, MIN, MODE, N, NMISS, P1, P10, P25, P5, P50, P75, P90, P95, P99, PAGEPCTN, PAGEPCTSUM, PCTN, PCTSUM, PROBT,
PRT, Q1, Q3, QRANGE, RANGE, REPPCTN, REPPCTSUM, ROWPCTN, ROWPCTSUM, SKEWNESS, STD, STDDEV, STDERR, SUM, SUMWGT, T,
UCLM, USS, VAR.
ERROR 200-322: The symbol is not recognized and will be ignored.
___________________________________________________________________________________________
mean='';
____
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
___________________________________________________________________________________________
sum='example text';
___
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
___________________________________________________________________________________________
Am I mistaken that I should have just added those statements within my proc tabulate statement, before the table statement?
Gahhhh disregard my last reply. I misunderstood, your suggestion worked.
Many thanks Ballard!!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.