With the ROW and COL specifications you can design your tables.
The expressions given in the specifications include names of
object and/or grouping variables as elements and operators,
which define how the elements are used. Only variables defined
in VARIABLES, IVARIABLES or GROUPING specifications may be used
The following operations are available:
* cross variables, e.g. A*B
, concatenate variables, e.g. A,B,C
() control the order of the other two operations, e.g. A*(B,C)
You can cross grouping variables with object variables or with
other grouping variables. Suppose that A and B are grouping variables
and Y is an object variable. Specification A*B means that the values
of B are nested within the levels of A:
A1 A1 A1 A2 A2 A2
B1 B2 B3 B1 B2 B3
Specification A*Y declares that statistics for the object variable
Y are requested for each group of A.
If A,B is specified then the levels of A are formed first and
the levels of B after that:
A1 A2 B1 B2 B3
Grouping variables may appear both in COL and ROW specifications,
but object variables only in either of them. If object variables
are given in COL specification then different cell statistics are
printed in different rows. If object variables are defined in ROW
specification then different statistics are represented each by their
own column.
Parenthesis may be used to define the order of the operations.
If A is a grouping variables and X and Y are object variables,
then specification
COL=A*(X,Y)
defines that first means of the two variables are represented
for the first group of A and after that for the second group
of A. If we want the means of variable X to be represented first
for all groups, we define
COL=A*X,A*Y
Especially the use of col specification is limited by the number
of columns available. By default, the table is split into
subtables so that the line length of the edit field is not
exceeded. The maximum number of columns in one (sub)table may
be decreased by MAXCOLS=<n of columns>.
Examples ...
Two simple examples describing the difference of COL and ROW
specifications:
MTAB IEADATA,178
VARIABLES=Knowldge
GROUPING=Attitude
COL=Attitude*Knowldge
Means, Deviations and Frequencies
Attitude Attitude Attitude Attitude
1.000 2.000 3.000 Total
Knowldge Knowldge Knowldge Knowldge
M 83.412 72.282 53.833 69.853
D 35.370 31.480 31.971 32.991
N 17 103 30 150
MTAB IEADATA,193
VARIABLES=Knowldge
GROUPING=Attitude
ROW=Attitude*Knowldge
Means, Deviations and Frequencies
Knowldge
Means St.d. N of obs
Attitude
1.000 Knowldge 83.412 35.370 17
2.000 Knowldge 72.282 31.480 103
3.000 Knowldge 53.833 31.971 30
Total Knowldge 69.853 32.991 150
Example: Three grouping variables and three object variables:
MTAB IEADATA,229
VARIABLES=Knowldge,Applicat,Mentalpr
GROUPING=Attitude,Sex,Grade
COL=S*(K,App,M) variable names in COL and ROW may be
ROW=G*Att shortened as long they are unique
Means, Deviations and Frequencies
Subtable 1
Sex Sex Sex Sex Sex
1.000 1.000 1.000 2.000 2.000
Knowldge Applicat Mentalpr Knowldge Applicat
Grade Attitude
7.000 1.000 M 72.667 56.000 12.333 83.000 45.000
D 26.577 12.767 19.140 - -
N 3 3 3 1 1
2.000 M 57.167 43.792 17.833 64.500 30.917
D 29.660 26.231 16.177 20.690 17.814
N 24 24 24 12 12
etc. ...
If both ROW and COL specifications are used but all grouping
variables are not used in those definitions, then the unreferred
grouping variables are treated as background variables. Results
are given for each combination of the values of the background
variables.
Further information:
M = More information on the MTAB operation