GET FILE = 'E:\CATEGORICAL FOR ZIPPING\DEMO CATEGORICAL DATA\crosstabs eg.sav'.

WEIGHT BY FREQ.

CROSSTABS  SEX BY REGION /CELLS = ROW . 
CROSSTABS  SEX BY REGION /CELLS = COLUMN . 

CROSSTABS
/TABLES=SEX BY REGION
/STATISTIC=CHISQ
/CELLS= COUNT EXPECTED ASRESID.

*-------------------------------

GET FILE = 'E:\CATEGORICAL FOR ZIPPING\DEMO CATEGORICAL DATA\crosstabs eg.sav'.

WEIGHT BY FREQ.

OMS
/SELECT TABLES
/IF SUBTYPES = ["Crosstabulation"]
/DESTINATION FORMAT = SAV OUTFILE = "E:\CATEGORICAL FOR ZIPPING\DEMO CATEGORICAL DATA\SREG.SAV".

CROSSTABS
/TABLES=SEX BY REGION
/STATISTIC=CHISQ
/CELLS= ASRESID.

OMSEND.

GET FILE="E:\CATEGORICAL FOR ZIPPING\DEMO CATEGORICAL DATA\SREG.SAV".

RENAME VARIABLES @NE=ASR1.
COMPUTE P1=SIG.CHISQ(ASR1**2,1).
RENAME VARIABLES SE=ASR2.
COMPUTE P2=SIG.CHISQ(ASR2**2,1).
RENAME VARIABLES W=ASR3.
COMPUTE P3=SIG.CHISQ(ASR3**2,1).

RENAME VARIABLES VAR2=SEX.
SPLIT FILE BY SEX.
SUMMARIZE
/TABLES=ASR1 ASR2 ASR3 P1 P2 P3
/FORMAT=LIST NOCASENUM NOTOTAL
/TITLE='GROUP COMPARISONS FOR RESPONSE CATEGORIES'
/MISSING=VARIABLE
/CELLS=NONE.


