Re: contrasts

From: damianCollins <asremlforum_at_VSNI.CO.UK>
Date: Fri, 29 Jan 2010 09:12:22 +0000

Dear Jim (NB. Arthur is away at present)

NB. you may wish to check that your "Material" factor does have 82 levels? Your !contrast statement suggests so. However, if so, I would have expected a NumDF of 80 (=82-2DF for mu and PopvsControl) in the analysis of variance table you provide.

Firstly, I am not sure whether the use of !contrast is the best approach to estimate this contrast (and its se). I think you would be better fitting Material alone and then using a predict statement to estimate the contrast: i.e. so your model would look like:

char ~ mu Material !r Loc REP.Loc BLOCK.REP.Loc Material.Loc !f mv + heterogeneous errors in 8 locations
and then use a predict statement to estimate the contrast between the control and the 78 lines: this would look like

predict !average Material 3*0 78*1 -78

(Note that I am using 3*0 here instead of '0 0 0' and 78*1 instead '1 1 1 .... 1' ). You can then divide the resultant estimate and its se in the output .pvs file by 78.
I realize you have already calculated the difference in the averages to be +4.4, but you need the above Predict statement to give you an SE on this contrast as well.
The reason I am suggesting this alternative approach is that, unfortunately, the !contrast option does not do what you may naively expect. It is creating a covariate with a value of -78 for control observations, 1 for the lines and 0 for the controls.
By fitting this PopvsControl covariate alone (as you do in the first model), you are fitting a different model to your default model, with just 1 effect (rather than 81 effects).
In the second model, you are fitting both PopvsControl and Material effects. The regression coefficient for PopvsControl is adjusted for the other fixed terms in the model (i.e. the Material effects), so again the estimate is different from what you would naively expect.

I think the !contrast statement is more useful for other purposes. In the example on p229 (p253) of the asreml manual, Arthur uses !contrast for the Oats example to set up a linear nitrogen contrast, so that he can for lack of fit from a linear nitrogen response (and finds there is no significant lack of fit).

Hope this helps
Damian Collins Biometrician I&I NSW

-------------------- m2f --------------------

Sent using Mail2Forum (

Read this topic online here:

-------------------- m2f --------------------
Received on Fri Jan 29 2010 - 09:12:22 EST

This webpage is part of the ASReml-l discussion list archives 2004-2010. More information on ASReml can be found at the VSN website. This discussion list is now deprecated - please use the VSN forum for discussion on ASReml. (These online archives were generated using the hypermail package.)