Hi:
What is a VARX??? Do you have 2 variables -- GROUP1 with values of YES and NO and then GROUP2 with values of YES and NO or do you have 1 variable with values of either GROUP1 or GROUP2???
In the situation you describe, would the variables going down the rows still be numeric variables (what you show as VAR1 and VAR2)? Or would they be category variables (like COUNTRY or REGION for example)??
It might help to see a little sample of data. For example, I can envision at least 2 possible ways that your data could be structured:
Possibility A:
[pre]
VARA VARB GROUP1 GROUP2 NVAR1 NVAR2
xxx yyy yes no 111 221
xxx yyy no no 112 222
xxx yyy no yes 113 223
aaa bbb yes yes 114 224
aaa bbb no no 115 225
[/pre]
and
Possibility B:
[pre]
VARA VARB GROUP RESP NVAR
xxx yyy GROUP1 yes 111
xxx yyy GROUP2 no 221
xxx yyy GROUP1 no 112
xxx yyy GROUP2 no 222
xxx yyy GROUP1 no 113
xxx yyy GROUP2 yes 223
aaa bbb GROUP1 yes 114
aaa bbb GROUP2 yes 224
aaa bbb GROUP1 no 115
aaa bbb GROUP2 no 225
[/pre]
If you look at SASHELP.PRDSALE, you will see that it has numeric variables ACTUAL and PREDICT and then the DIVISION variable has values of CONSUMER or EDUCATION and the REGION variable has the values of EAST or WEST. COUNTRY has 3 possible values. The example program below shows the difference between using ACTUAL and PREDICT in the ROW dimension (table 1) versus using all category variables in the ROW and COL dimensions (table 2) versus using a numeric variable nested with the category variables in the COL dimension (table 3).
If you look at SASHELP.PRDSALE and compare the structure of its data to the structure of your data, you may get some ideas of how to plug your variables into this sample program.
cynthia
[pre]
ods html file='c:\temp\catvars.html' style=sasweb;
proc tabulate data=sashelp.prdsale;
title '1) Sum of Numeric Vars In the Cells';
class division region;
var actual predict;
table actual predict,
division region all;
run;
proc tabulate data=sashelp.prdsale;
title '2) Count of Category Variables in the Cells';
class division region country;
table country all,
division region all;
run;
proc tabulate data=sashelp.prdsale;
title '3) Sum of Actual in the Cells';
class division region country;
var actual;
table country all,
actual*(division region all);
run;
ods html close;
[/pre]