• No results found

Variance structures

In document ASREML user guide release 3.0 (Page 153-159)

The previous sections have introduced variance modelling in ASReml using the

NIN data for demonstration. In this and the remaining sections the syntax is described formally, still using the example where appropriate.

Recall from Equation 2.2 on page 7 that the variance for the random effects in Revised 08

the linear mixed model was defined including an overall scale parameterθ. When this parameter is 1.0, RandGare defined in terms of variances. Otherwise they are defined relative to this scale parameter. Typically, θ is 1 if there are several residual variances as in the case of multivariate analysis (a different residual variance for each trait) or multienvironment trials (a different residual variance for each trial). However, for simple analyses with a single residual variance, θis modelled as the residual variance so that R becomes a correlation matrix.

7 Command file: Specifying the variance structures 127

General syntax

Variance model specification in ASRemlhas the following general form [variance header line

[R structure definition lines]

[G structure header and definition lines] [variance parameter constraints]]

variance header line specifies the number of R and G structures,

R structure definition linesdefine the R structures (variance models for error)

as specified in the variance header line,

G structure header and definition linesdefine the G structures (variance models

for the additional random terms in the model) as specified in the variance header line; these lines are always placed after any R structure definition lines,

variance parameter constraintsare included if parameter constraints are to be

imposed, see the !VCC c qualifier in Table 5.5 and Section 7.9 on constraints between and within variance structures.

A schematic outline of the variance model specification lines (variance header line, and R and G structure definition lines) is presented in Table 7.2 using the variance model of 4for demonstration.

Table 7.2: Schematic outline of variance model specification in ASReml

general syntax model 4

variance header line [s[c[g]]] 1 2 1

- - - -

R structure definition lines S 1 C 1 C 2 .. . Cc 11 column AR1 0.3 22 row AR1 0.3 . . . - S 2 C 1 .. . Cc - . . . - .. . ... ... Ss C 1 .. . Cc - . . . - - - - -

7 Command file: Specifying the variance structures 128

Table 7.2: Schematic outline of variance model specification in ASReml

general syntax model 4

G structure definition lines G 1 repl 1 4 0 IDV 0.1

G 2 -

..

. ...

Gg -

Variance header line

NIN Alliance Trial 1989 variety !A id . . . row 22 column 11 nin89aug.asd !skip 1

yield mu variety !r repl, !f mv 1 2 1 22 row AR1 0.3 11 column AR1 0.3 repl 1 repl 0 IDV 0.1 The variance header line is of the form

[s [c [g]]]

s and c relate to the R structures,g is the

number of G structures,

the variance header line may be omitted

if the default IID R structure is required, no G structures are being explicitly defined and there are no parameter constraints (see

!VCC and examples1 and 2a),

sis used to code the number of independent

sections in the error term

– ifs= 0, the defaultIIDR structure is assumed and no R structure definition

lines are required (as in examples2b and 5),

– ifs>0,sR structure definitions are required, one for each of thessections

(as in examples3a,3b,3c and4),

– for the analysis of multi-section data s can be replaced by the name of a

factor with the appropriate number of levels, one for each section,

cis the number of component variance models involved in the variance struc-

ture for the error term for each section; for example, 3a, 3b and 3c have

column.row as the error term and the variance structure for column.row in- volves 2 variance models, the first for columnand the second for row,

7 Command file: Specifying the variance structures 129

g is the number of variance structures (G structures) that will be explicitly

specified for the random terms in the model.

R and G structures are now discussed with reference to s, c and g. As already noted, each variance structure may involve several variance models which relate to the individual terms involved in the random effect or error. For example, a two factor interaction may have a variance model for each of the two factors involved in the interaction. Variance models are listed in Table 7.3. As indicated See Table 7.3

in the discussion of2b, care must be taken with respect to scale parameters when See Section 7.7

combining variance models (see also Section 7.7). R structure definition

For each of thessections there must becR structure definitions. Each definition may take several lines. Each R structure definition specifies a variance model and has the form

NIN Alliance Trial 1989 variety !A . . . row 22 column 11 nin89aug.asd !skip 1

yield mu variety !r repl, !f mv 1 2 1 11 column AR1 0.3 22 row AR1 0.3 repl 1 repl 0 IDV 0.1

order [field model [initial values] [qualifiers] [additional initial values]]

order is either the number of levels in the

corresponding term or the name of a factor that has the same number of levels as the term, for example,

11 column AR1 0.5

is equivalent to

column column AR1 0.5

when columnis a factor with 11 levels,

field is the name of the data field (variate or factor) that corresponds to the

term and therefore indexes the levels of the term;

– ASReml uses this field to sort the units so they match the R structure, – in the example the data will be sorted internally rows within columns for

the analysis but the residuals will be printed in the .yht file in the original order (which is actually rows within columns in this case).

ImportantIt is assumed that the joint indexing of the components uniquely defines the experimental units,

– if field is a variable, it can be plot coordinates provided the plots are in a

7 Command file: Specifying the variance structures 130

11 lat AR1 0.3 22 long AR1 0.3

is valid because latgives column position andlonggives row position, and the positions are on a regular grid. The autoregressive correlation values will still be on an plot index basis (1, 2, 3, . . . ), not on a distance basis (10m, 20m, 30m, . . . ),

– if the data is sorted appropriately for the order the models are specified, set

field to 0,

model specifies the variance model for the term, for example, 22 row AR1 0.3

chooses a first order autoregressive model for the row error process,

– all the variance models available in ASRemlare listed in Table 7.3, – these models have associated variance parameters,

– a error variance component (σ2e for the example, see Section 7.3) is auto-

matically estimated for each section,

– the default modelisID,

initial valuesare initial or starting values for the variance parameters and must

be supplied, for example,

22 row AR1 0.3

chooses an autoregressive model for the row error process (see Table 7.1) with a starting value of 0.3 for the row correlation,

qualifierstellASRemlto modify the variance model in some way; the qualifiers

are described in Table 7.4,

additional initial valuesare read from the following lines if there are not enough

initial values on the model line. Each variance model has a certain number of parameters. If insufficient non zero values are found on the model lineASReml

expects to find them on the following line(s),

– initial values of 0.0 will be ignored if they are on the model line but are

accepted on subsequent lines,

– the notation n*v (for example, 5 * 0.1) is permitted on subsequent lines

(but not the model line) when there arenrepeats of a particular initial value

v,

– only in a few specified cases is0permitted as an initial value of a non-zero

7 Command file: Specifying the variance structures 131

G structure header and definition lines

There are g sets of G structure definition lines and each set is of the form

NIN Alliance Trial 1989 variety !A id . . . row 22 column 11 nin89aug.asd !skip 1

yield mu variety !r repl, !f mv 1 2 1 22 row AR1 0.3 11 column AR1 0.3 repl 1 repl 0 IDV 0.1 model term d

order [key model [initial values] [qualifier] [additional initial values]]

order [key model [initial values] [qualifier] [additional initial values]]

.. .

order [key model [initial values] [qualifier] [additional initial values]]

model term is the term from the linear

model to which the variance structure ap- plies; the variance structure may cover ad- ditional terms in the linear model, see Sec- tion 7.8

dis the number of variance models and hence direct product matrices involved

in the G structure; the following lines define the d variance models,

order is either the number of levels in the term or the name of a factor that

has the same number of levels as the component,

key is usually zero but for power models (EXP,GAU,. . . ) provides the distance

data needed to construct the model,

model is theASRemlvariance model identifier/acronym selected for the term, – variance models are listed in Table 7.3,

– these models have associated variance parameters,

initial values are initial or starting values for the variance parameters, the

values for initial values are as described above for R structure definition lines,

qualifiertellsASRemlto modify the variance model in some way; the qualifiers

7 Command file: Specifying the variance structures 132

In document ASREML user guide release 3.0 (Page 153-159)