<< Click to Display Table of Contents >> Navigation: User guide > Tables > Stub |
Stub is the name used for the rows (the variable used down the side of the printed table).
The stub represents the vertical dimension of the table and must be an svar or an mvar or a number.
A global stub may be set for tables by the following command:
SELECT STUB variable,
On tables following, where no stub is specified, the variable selected will be used.
A variable is normally specified on the first definition of a table, either explicitly or via a SELECT command. The number of rows on the table will be the bit length of the variable plus the total row.
If no stub is specified or implied for a distribution table, only the total row is supplied.
A number n may only be used on the second and subsequent definitions of a table. It means that the nth row of the table, only, will be incremented. If n is 0, only the total is incremented; all other rows remain unchanged.
A stub may contain up to 30000 rows.
Examples of TABULATE commands for distribution tables:
t #1=$age*$sex,
t #23a=5*$break,
t #tot= *$break,
The stub may be an svar or an ivar or a wvar, and represents the score to be applied to the data in the table. A four row table is created:
row 0 total row, number of records in table
row 1 total excluding those for whom stub is undefined
row 2 sum of score values from stub
row 3 sum of squared values from stub
SELECT STUB commands are not used for statistics tables.
Examples of TABULATE commands for statistics tables:
t #1=@$iage*$sex,
t #sta=@$wsum *$break,
The stub represents the vertical dimension of the table and must be an ivar, wvar or a cvar (which must be length 20, 100 or 250) followed by the number of rows to allocate.
The maximum number of rows on the table is given in parentheses after the variable name. The rows of the table are filled with the actual values found in the stub variable. If more different values are found than rows were allocated an error message appears during execution.
No V labels are needed because these are generated by CL.
Examples of TABULATE commands for value distribution tables:
t #1=$salary(500)*$sex,
t #ctot=$post(2000)*,