Examples (DISCRIMINANT command)
Writing Output to a Matrix Data File
GET FILE='/DATA/UNIONBK.SAV' /KEEP WORLD FOOD SERVICE BUS MECHANIC
CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT GROUPS=WORLD(1,3)
/VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
/METHOD=WILKS
/PRIORS=SIZE
/MATRIX=OUT('/DATA/DISCMTX.SAV').
-
DISCRIMINANT
reads data from the data file UNIONBK.SAV and writes one set of matrix materials to the file DISCMTX.SAV. - The active dataset is still UNIONBK.SAV. Subsequent commands are executed on this file.
Using Matrix Output to Classify Data in a Different File
GET FILE=UB2 /KEEP WORLD FOOD SERVICE BUS MECHANIC
CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT GROUPS=WORLD(1,3)
/VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
/METHOD=WILKS
/PRIORS=SIZE
/MATRIX=IN(DISCMTX).
- The matrix data file created in the previous example is used to classify data from the file UB2.
Replacing the Active Dataset with Matrix Data Output
GET FILE=UNIONBK /KEEP WORLD FOOD SERVICE BUS MECHANIC
CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT GROUPS=WORLD(1,3)
/VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
/METHOD=WILKS
/PRIORS=SIZE
/MATRIX=OUT(*).
LIST.
-
DISCRIMINANT
writes the same matrix as in the first example. However, the matrix data file replaces the active dataset. - The
LIST
command is executed on the matrix file, not on the UNIONBK file.
Using the Active Dataset as Matrix Input
GET FILE=DISCMTX.
DISCRIMINANT GROUPS=WORLD(1,3)
/VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
/METHOD=RAO
/MATRIX=IN(*).
- This example assumes that you are starting a new
session and want to read an existing matrix data file.
GET
retrieves the matrix data file DISCMTX. -
MATRIX
=IN
specifies an asterisk because the matrix data file is the active dataset. IfMATRIX=IN(DISCMTX)
is specified, the program issues an error message. - If the
GET
command is omitted, the program issues an error message.
Using Matrix Output as Matrix Input in the Active Dataset
GET FILE=UNIONBK /KEEP WORLD FOOD SERVICE BUS MECHANIC
CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT GROUPS=WORLD(1,3)
/VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
/CLASSIFY=SEPARATE
/MATRIX=OUT(*).
DISCRIMINANT GROUPS=WORLD(1,3)
/VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
/STATISTICS=BOXM
/MATRIX=IN(*).
- The first
DISCRIMINANT
command creates a matrix withCLASSIFY=SEPARATE
in effect. To read this matrix, the secondDISCRIMINANT
command must specify eitherBOXM
orGCOV
onSTATISTICS
orSEPARATE
onCLASSIFY
.STATISTICS=BOXM
is used.