Re: Difference between forms of factor coding: "*" and "!I"

From: Arthur Gilmour <arthur.gilmour_at_CARGOVALE.COM.AU>
Date: Tue, 4 Aug 2009 21:14:41 +1000

Dear Jason,

If a data field contains the numbers 0 1 3 5
and it is a declared a factor with

  FACTOR *

ASReml formally defines it as a factor with 5 levels, three being
present, but with some records having no level assigned (equivalent to
the factor being missing but it is not formally recognised as missing).

So the data summary will declare the number of records with FACTOR
Zero,

  FACTOR !I
on the other hand uses the 0 as a name of a level and so defines the
factor as having 4 levels (none missing or zero).

So, if you include this in a model which also includes model term mu,
e.g.

  ~ mu FACTOR !r random

it should be equivalent in the sense that mu should have 1 DF and
FACTOR 3 DF.
Under the FACTOR * definition, mu will fit the mean of the '0' levels
(the refernece level) and the FACTOR effects will be the contrasts of
levels 1, 3 and 5 from the mean of the '0' levels.

Under the FACTOR !I case, the 'reference' level will be whichever of
0, 1 3 or 5 appeared first.

With 'FACTOR !I !SORT', the refenence level should be '0'

Now, I have a driver coming to pick me up so have note looked closely at
the example. I'll do that this evening. Hopefully, I'll have an
explanation.

On Mon, 2009-08-03 at 15:56 -0700, Jason McComb wrote:
> Dear Jason,
>
> Your expectation is what I would have expected.
>
> Try defining variety wothout the !SORT
>
> If that agrees with variety *
> then the problem is associated with the !SORT qualifier.
>
> In anycase , I would be happy to look at the outputs (.asr) from the
> three jobs,
> to see if there is another explanation. If you can send the data
> and .as file,
> I can find out exactly what is happening. Send to
> arthur.gilmour_at_cargovale.com.au if you do not want everyone to see
> your data.
>
>
> Dear Arthur,
>
>
>
> Thanks for your reply! I apologize that my question was probably not
> well described, as it seems to be related to the situation where some
> factor levels are coded as zeros.
>
>
>
> Attached is the subset of field data and the .as file. Site #1 is a
> clonal seed orchard without experimental design where each clone has
> 1-4 ramets. I simply treat clones as repeated measures of parent
> trees. Site #2 is a progeny trial with RCB design using half-sib
> families from the seed orchard. I set clone = parent ID at site #1 but
> set clone = 0 at site #2. Similarly, family is set to zero at site #1
> where there is no family structure.
>
>
>
> In model 1, I specifically use at() for each random terms, and coding
> family as "!I" or "*" does not make any difference. In model 2, no
> at() function is used, as I believe that ASReml will skip the level of
> zero automatically. In this case, however, the standard error as well
> as Wald statistics for the site effect differ between using "!I" and
> "*" for family coding.
>
>
>
> So, my questions are: (1) How does ASReml deal with level 0 in both "!
> I" and "*" coding schemes? The manual doesn't mention that. It seems
> to me that observations with 'level 0' are dropped by ASReml but are
> accounted for in calculating degrees of freedoms and standard error.
> Is that right? (2) Why do "!I" and "*" make differences in the fixed
> site effect but make no differences in estimating variance components
> and BLUPs for the random family effect.
>
>
>
> I really appreciate your help, thanks!
>
>
>
>
> Jason Blenis
>
>
>
> Department of Agricultural, Food and Nutritional Science
>
> University of Alberta
>
> Edmonton, Alberta
>
> Canada
>
>

-- 
Best Wishes,
Arthur Gilmour
Adjunct Professor
School of Computing and Mathematics
Charles Sturt University
Jesus went to the synagogue in every town in Galilee to preach and drive
out demons.
A leper came, knelt down and said, "If you will, you can make me clean".
Jesus was moved. He reached out and touched him and said 
"I am willing.  Be clean." He was cleansed immediately.
Mobile Number +61 427 227 468
Home phone +61 2 6364 3288  Skype: Arthur.Gilmour
http://www.CargoVale.com.au/asreml
Travel:
Brazil  Jul22 - Aug 8  BR Biometrics
UK      Aug 10-14   ASReml workshop VSN
Mumbai  Aug 16-17   ASReml workshop
Adelaide AAABG 27Sept to 2 Oct
Brisbane Probe 29Nov to 6 Dec
Bangladesh Prosihhkon 31Dec - 31 Jan
Received on Wed Aug 04 2009 - 21:14:41 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.)