CTables - colpct but with count total

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CTables - colpct but with count total

Jignesh Sutar-3
Hi,

Is it possible to replicate the custom table below but instead of showing the total column percentage as 100% to display the count for the total row only i.e. showing the base size of the column percentages?

Would be very handy if this was possible...


get file = "C:\Program Files\IBM\SPSS\Statistics\22\Samples\English\Employee data.sav".

ctables /table jobcat [c] by gender [c][colpct]
  /categories variables=jobcat total=yes.


Thanks in advance,
Jignesh
Reply | Threaded
Open this post in threaded view
|

Re: CTables - colpct but with count total

Jon K Peck
Try this.
CTABLES
  /TABLE jobcat [C][COLPCT.COUNT PCT40.1, TOTALS[COUNT F40.0]] BY gender [C]
  /SLABELS POSITION=ROW
  /CATEGORIES VARIABLES=jobcat ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES.

It specifies custom statistics for the total.  Note that I added the SLABELS POSITION=ROW specification in order to avoid generating a separate column for the total statistics.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Jignesh Sutar <[hidden email]>
To:        [hidden email],
Date:        11/26/2013 07:17 AM
Subject:        [SPSSX-L] CTables - colpct but with count total
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,

Is it possible to replicate the custom table below but instead of showing the total column percentage as 100% to display the count for the total row only i.e. showing the base size of the column percentages?

Would be very handy if this was possible...


get file = "C:\Program Files\IBM\SPSS\Statistics\22\Samples\English\Employee data.sav".

ctables /table jobcat [c] by gender [c][colpct]
  /categories variables=jobcat total=yes.



Thanks in advance,
Jignesh