4.7 Data file

This is a block entry. The block begins with a line containing the code DATA (can be abbreviated to DAT) followed by the name of the data file. There is no default name. The general form of the data file required in described in 6.2.

The following lines specify the record layout of the data file for all traits. There are two alternative ways of specification.

4.7.1 Simple

For each trait in turn, there should be one parameter file line for each column, up to the last column used in the analysis.
The lines can have up to 3 elements :

(a)
The code TRn  where n  is a one- or two-digit trait number. This can be omitted for univariate analyses.
(b)
The name of the variable in this column.
(c)
The maximum number of levels. This is required if the column represents a fixed or random effect in the model of analysis or a control variable in a random regression analysis.

The block is terminated by a line with the code END.

EXAMPLE:

DATA  mydata.dat
  TR1  traitno 2
  TR1  animal  1000
  TR1  fixeffect 50
  TR1  weight
  TR2  traitno 2
  TR2  animal 500
  TR2  fixeffect 30
  TR2  feedintake
END DATA

This shows the block for an analysis reading records for 2 traits from the file mydata.dat.

4.7.2 Compact

If there are several traits for which the record layout is the same, the respective record layout can be given for the whole group of traits. This avoids tedious duplication of lines.

This alternative is selected by placing the code GRP after the name of the data file (same line, separated by a space).
For each group of traits, the following lines need to be given :

1.
A ‘header’ line beginning with the code TRNOS (can be abbreviate to TRN), followed by the running numbers of the traits in the group on the same line.
2.
One line for each column in the data file (up to the last column used) which is the same for all traits, containing
(a)
the variable name
(b)
the maximum number of levels, if the column represents a fixed or random effect in the model of analysis
3.
One line for each column which has a different name for different traits (e.g. representing the traits to be analysed), containing
(a)
the code NAMES (can be abbreviated to NAM)
(b)
the variable names (on the same line, space separated; the same number of variables as traits in the group must be given)

Again, the block is terminated by a line with the code END.

EXAMPLE:

DATA  mydata.dat  GRP
   TRNOS  1 2
   traitno     2
   animal   1000
   fixeffect  50
   NAMES   weight  feedintake
END DATA

This shows the ‘grouped’ alternative for specifying the data file layout, for two traits with the same column structure in the example above.