12-15-2017 05:44 PM
When I request submit PROC FREQ code that requests a three-way table, each formatted level of the first named variable produces a separate two-way table of the last two variables named on the Tables statement. In order for the output to be useful, the formatted value of the first named variable SHOULD BE printed above each constructed table. I used to get a line saying "Controlling for ..." to indicate what value(s) of the first named variable produced a specified cross-tabulation. I no longer get the "Controlling for ..." message.
I presume that there is some sort of option or environmental variable that is causing the "Controlling for ..." statement to be suppressed. Any idea what that option/environmental variable might be?
For instance, if I have three variables, A, B, and C with A taking on values 1, 2, and 3, and I submit the code:
proc freq data=mydata;
I should get three tables of B*C for each of the three levels of A. The first table should be preceded by the text "Controlling for A=1", the second preceded by "Controlling for A=2", and similarly for the third table. I do not get such text now. How do I restore such text?
12-18-2017 07:28 PM
Have you are anyone modified the templates use by Proc Freq for tables?
Do you have an entry for CROSSTABFREQS in any template path other than in SASHELP.Tmplbase?
In the results window right click on Results and select Templates from the menu. Do you have anything that starts with a name other than SASHELP? If that template repository, likely SASUSER.TMPLAT contains a CROSSTABFREQS that is a likely culprit.
Or run this code:
proc template; path show; run;
The default result in the log would look like:
1. SASUSER.TEMPLAT(UPDATE) 2. SASHELP.TMPLMST(READ)
If you have another path, especially if it has a lower number than SASHELP.TMPLMST, that may have another CROSSTABFREQS.
You can set your system to ignore templates not created by SAS by using either
proc template; path verify; run;
Or if you find the modified template ensure that it has this code in the template:
define ControllingFor; dynamic StratNum StrataVariableNames StrataVariableLabels; text "Controlling for" StrataVariableNames / StratNum>0; end;