Date: Fri, 9 Jun 2006 11:22:04 -0400
Reply-To: Edward Boadi <eboadi@abhct.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Edward Boadi <eboadi@abhct.com>
Subject: Custom Tables
Content-Type: text/plain; charset="iso-8859-1"
Table 1 below was produced using the following syntax :
* Custom Tables.
CTABLES
/VLABELS VARIABLES=Var1 Var2 Var3 DISPLAY=DEFAULT
/TABLE Var1 > Var2 [COUNT F40.0, LAYERPCT.COUNT PCT40.1] BY Var3 .
Table 1
Var3
Var1 Var2 # %
a m 10 13.5
f 12 16.2
b m 23 31.1
f 8 10.8
c m 9 12.2
f 12 16.2
Total 74 100.0
From the table , we see that % = (10/74)*100 , (12/74)*100 ................ etc
My qustion is , what modification to the syntax above is needed to get Table 2
I have a way of getting to Table 2 but modering if it is possible to use CTABLES to achive same results.
Table 2
Var3
Var1 Var2 # %
a m 10 23.8
f 12 37.5
b m 23 54.8
f 8 25.0
c m 9 21.4
f 12 37.5
Total m 42 56.8
f 32 43.2
For Table 2 , % m = (10/42)*100 , (23/42)*100 , (9/42)*100
and %f = (12/32)*100 -------- etc