

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


WEIGHT BY freq .

FREQUENCIES
  VARIABLES=region
  /ORDER=  ANALYSIS .

GRAPH
  /BAR(SIMPLE)=COUNT BY region .

NPAR TEST
  /CHISQUARE=region
  /EXPECTED=EQUAL
  /MISSING ANALYSIS.

NPAR TEST
  /BINOMIAL (.50)= sex
  /MISSING ANALYSIS.


* CIs for a binomial proportion available using new dialogue boxes (and syntax)  available in V19+
*Nonparametric Tests: One Sample. 

NPTESTS 
  /ONESAMPLE TEST (sex) BINOMIAL(TESTVALUE=0.5 CLOPPERPEARSON 
    JEFFREYS LIKELIHOOD  SUCCESSCATEGORICAL=FIRST SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) 
  /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE
  /CRITERIA ALPHA=0.05 CILEVEL=95.
