GET FILE='C:\Program Files\SPSS\Tutorial\sample_files\customer_dbase.sav'.


* Should use SELECTPRED outputs as inputs
*.
NAIVEBAYES _01 
  BY ZNJeS R[J[h R[ID Lb`z J[h J[h2  
      ʋ΃J[v[ X[z dq JeS u ] C^[lbg 
       Q[ ipod PC zҋJeS ʘb {CX
  WITH J[hO  uO lnJ[hO lnO 
      ybg_W zҋ O 
  /SUBSET NOSELECTION
  /SAVE PREDPROB.


* Compute predicted response using probability > 30% and crosstabulate
*.
COMPUTE predresponse = PredictedProbability_2 > 0.30 .
EXECUTE .

CROSSTABS
  /TABLES=_01  BY predresponse
  /FORMAT= AVALUE TABLES
  /CELLS= COUNT
  /COUNT ROUND CELL .



