DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


CreateIndicatorVars

Declaration: CreateIndicatorVars (cix: integer; var FirstCol, LastCol: integer): integer;
The function CreateIndicatorVars creates indicator variables based on the nominal or ordinal variable cix. The paranmeter cix may take values from 0 to DStore.NrOfColumns. If cix is set to zero the class information is used to create the indicators, otherwise cix points to the column of the data matrix. The indicator variables are appended to the data matrix and the variable parameters FirstCol and LastCol return the index range of the new indicator variables.

The function returns the following error codes:

 0 ... everything is OK, the indicator variables have been created
-1 ... cix is out of range
-2 ... variable cix is not an ordinal or nominal variable (see DStore.MScaleType)
-3 ... variable cix has too many categories (a maximum of 99 categories is supported)