By convention an ASRemlcommand file has a.as extension. The file defines See Chapters 5,
6 and 7 for de-
tails • a title line to describe the job,
• labels for the data fields in the data file and the name of the data file, • the linear mixed model and the variance model(s) if required,
• output options including directives for tabulation and prediction.
Below is theASRemlcommand file for an RCB analysis of theNINfield trial data highlighting the main sections. Note the order of the main sections.
title line−→ data field definition−→ . . .
data field definition−→ data file name and qualifiers−→ tabulate statement−→ linear mixed model definition−→ predict statement−→ variance model specification−→ . .
NIN Alliance trial 1989
variety !A id pid raw repl 4 nloc yield lat long row 22 column 11 nin89.asd !skip 1
tabulate yield ∼ variety yield ∼ mu variety !r repl predict variety
0 0 1 repl 1
repl 0 IDV 0.1
The title line
NIN Alliance trial 1989
variety !A id
. . . The first text (non-blank, non control) line in an ASReml command file is taken as the title for the job and is purely descriptive for future reference.
3 A guided tour 32
Reading the data
NIN Alliance trial 1989
variety !A id pid raw repl 4 nloc yield lat long row 22 column 11 nin89.asd !skip 1 . . . The data fields are defined before the data file name is specified. Field definitions must be given for all fields in the data file and in the order in which they appear in the data file. Data field definitions must be indented. In this case there are 11 data fields (variety
. . .column) in nin89.asd, see Section 3.3. The !A after variety tells ASReml that the first field is an alphanumeric factor and the 4
after repl tells ASReml that the field called
repl (the fifth field read) is a numeric factor with 4 levels coded 1:4. Similarly forrowand
column. The other fields include variates (yield) and various other variables. The data file line
NIN Alliance trial 1989 variety !A id pid . . . row 22 column 11 nin89.asd !skip 1
tabulate yield ∼ variety yield ∼ mu variety !r repl predict variety
0 0 1 repl 1
repl 0 IDV 0.1 The data file name is specified immediately
after the last data field definition. Data file qualifiers that relate to data input and out- put are also placed on this line if they are re- quired. In this example,!skip 1tellsASReml See Section 5.7
to ignore (skip) the first line of the data file
nin89.asd, the line containing the field labels. The data file line can also contain qualifiers See Section 5.8
that control other aspects of the analysis. These qualifiers are presented in Section 5.8. Tabulation . . . column 11 nin89.asd !skip 1
tabulate yield ∼ variety
yield ∼ mu variety !r repl predict variety
. . . Optionaltabulatestatements provide a sim- See Chapter 10
ple way of exploring the structure of a data. They should appear immediately before the model line. In this case the 56 simple variety means for yield are formed and written to a
.tab output file. See Chapter 10 for a discus- sion of tabulation.
3 A guided tour 33
Specifying the terms in the mixed model
NIN Alliance trial 1989 variety !A . . . column 11 nin89.asd !skip 1
tabulate yield ∼ variety
yield ∼ mu variety !r repl
predict variety 0 0 1
repl 1
repl 0 IDV 0.1 The linear mixed model is specified as a list
See Chapter 6
of model terms and qualifiers. All elements must be space separated. ASReml accommo- dates a wide range of analyses. See Section 2.1 for a brief discussion and general algebraic formulation of the linear mixed model. The model specified here for theNINdata is a sim- ple random effectsRCBmodel having fixed va- riety effects and random replicate effects. The reserved word mu fits a constant term (inter-
cept), variety fits a fixed variety effect and repl fits a random replicate effect. The !r qualifier tellsASReml to fit the terms that follow as random effects.
Prediction
NIN Alliance trial 1989 variety !A . . . column 11 nin89.asd !skip 1
tabulate yield ∼ variety yield ∼ mu variety !r repl
predict variety
0 0 1 repl 1
repl 0 IDV 0.1 Prediction statements appear after the model
See Chapter 10
statement and before any variance structure lines. In this case the 56 variety means for yield as predicted from the fitted model would be formed and returned in the .pvs output file. See Chapter 10 for a detailed discussion of prediction inASReml.
Variance structures
NIN Alliance trial 1989 variety !A . . . column 11 nin89.asd !skip 1
tabulate yield ∼ variety yield ∼ mu variety !r repl predict variety
0 0 1 repl 1
repl 0 IDV 0.1
The last three lines are included for exposi- tory purposes and are not actually needed for this particular analysis. An extensive range of See Chapter 7
variance structures can be fitted in ASReml. See Chapter 7 for a lengthy discussion of vari- ance modelling in ASReml. In this case in- dependent and identically distributed random replicate effects are specified using the iden- tifier IDV in a G structure. G structures are described in Section 2.1 and the list of avail-
3 A guided tour 34
able variance structures/models is presented in Table 7.3. SinceIDVis the default variance structure for random effects, the same analysis would be performed if these lines were omitted.