Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SPSS: How to arrange counts and percentage in horizontal order?

Tags:

spss

The usual crosstabulation table in spss looks like this:

                               Variable 2
                               category A
                           Counts    Percentage
Variable 1    category1    value1    per1
              category2    value2    per2

How do I do it in spss such that the table will look like this? Is this possible using some syntax?

                                          Variable 2
                                          category A
Variable 1    category1    Counts         value1    
                           Percentage     per1
              category2    Counts         value2    
                           Percentage     per2
like image 500
dixi Avatar asked Oct 16 '25 03:10

dixi


1 Answers

I'm not sure if the CROSSTAB command does produce the table as you indicate?

Using the Employee Data.sav data shipped with SPSS and the below example

GET FILE="C:\PROGRAM FILES\IBM\SPSS\STATISTICS\24\SAMPLES\ENGLISH\EMPLOYEE DATA.SAV".
CROSSTABS
  /TABLES=gender BY minority
  /FORMAT=AVALUE TABLES
  /CELLS=COUNT ROW
  /COUNT ROUND CELL.

I get the below, which looks like it is in your desired format?

enter image description here

Alternatively, if you have access to SPSS add-on module CUSTOM TABLES then there is great deal of flexibility to change table structures.

EDIT:

Using CUSTOM TABLES you can use the /SLABELS POSITION={ROW|COLUMN} subcommand to specify how you would like statistics to be presented:

CTABLES
  /TABLE gender [COUNT F40.0 COLPCT.COUNT] BY minority
  /SLABELS POSITION=ROW.

The equivalent can be found in the CUSTOM TABLE GUI also:

enter image description here

like image 182
Jignesh Sutar Avatar answered Oct 19 '25 14:10

Jignesh Sutar