Re: lsmeans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lsmeans



Dear Yuandan

The lsmeans you have are all mixed up.
See below.

> X-Sender: yzhang@metz.une.edu.au
> Date: Wed, 10 Jun 1998 09:41:58 +1000
> To: asreml@chiswick.anprod.CSIRO.AU
> From: Yuandan Zhang <yzhang@metz.une.edu.au>
> Subject: lsmeans
> Mime-Version: 1.0
> 
>  Dear asreml users,
> I run a mixed model using asreml to estimate heritibilities for antibody
> measurements. I am interested in least squares means of some fixed effects
> and their interations too. In this model, 2 bloodlines, 3 experiment groups
> and their interactions (six levels) are fitted as fixed effects. But it is
> interesting that three of six lsmeans and stderr for interations are
> exactly the same for all 11 bleedings. obiously there is some thing wrong.
> Can some one diagnosis  and explain more about the lsmeans output for me? 
> Regards,
> 
> Yuandan
> Following are the as, pin, and pvs files of one bleeding for your reference.
> 
> ab.as
> Chiswick trial on antibody measurements
>         animal !P
>         sire 
>         dam 
>         pen 90
>         line 2 #1 IRH 2 CH  
>         exptgp 3 #1 control, 2 irridiated larve(low dose), 
> 	#3 normal larve, high dose. 
> 	wwt  # covariate
>         ab_13_3 

> ab.txt !MAXIT 20
> ab.txt !MAXIT 20
> ab_29_5  ~mu line exptgp exptgp.line !r animal 
> 
> ab.pin
> 
> F VarPhen 1 2
> H heritibility  1 3
> e_lmeans {7 8}/2 {9:11}/3 [1:6] 12
> lmeans {1:6}/6 {9:11}/3 [7 8] 12
> exmeans {1:6}/6 {7 8}/2 [9:11] 12
>

The problems with this code are:
  1   Columns should be referenced in order [e_lmeans and lmeans do not satisfy
           this requirement.
  2   You have assumed the wrong order of factors for E and L
      You need to check the .asr or .sln file to see what the order is.
      The model said mu L E E.L  so the order becomes  E.L E L mu  as below
  3   For complex situations, it is helpful to map out each predicted mean.
      Then collapse them where that is possible.
      
   
>From the model, the effects can be identified as
     E1L1 E1L2 E2L1 E2L2 E3L1 E3L2 E1 E2 E3 L1 L2 mu
       1    2    3    4    5    6   7  8  9 10 11 12

E1L1  1                             7       10    12
E1L2        2                       7          11 12
E2L1             3                     8    10    12
E2L2                  4                8       11 12
E3L1                       5              9 10    12
E3L2                            6         9    11 12

E1    {1    2}/2                    7      {10 11}/2   12
E2             {3 4}/2                 8   {10 11}/2   12
E3                    {5 6}/2            9 {10 11}/2   12

L1   {1 3 5}/3                      {7 8 9}/3 10    12
L2   {2 4 6}/3                      {7 8 9}/3   11  12


The first 6 of these lines could be contracted to
E1L  [ 1 2 ]  7  //  [10 11] 12
E2L  [ 3 4 ]  8  //  [10 11] 12
E3L  [ 5 6 ]  9  //  [10 11] 12

but the presense of the interaction prevents the other lines 
from being contracted.  
 

If you had used the model  mu c(L) c(E) c(E.L)

The coefficients would have been [assuming all six E.L combnations were present)

      E1L1   E2L1   E1 E2  L1 mu
        1     2      3  4   5  6
        
and the means would then be predicted by

 EL1   [ 1 2 0 ] // [ 3 4 0 ]  5  6
 El2   [ 1 2 0 ] *-1 // [ 3 4 0 ] -5 6
 
 E                  [3 4 0 ] 6
 L                            [5 0] 6
 
 
 You might like to check this and let me know if it doesn't work.
 I believe it should.
 
 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Arthur Gilmour PhD                    email: Arthur.Gilmour@agric.nsw.gov.au
Senior Research Scientist (Biometrics)                 fax: <61> 2 6391 3899
NSW Agriculture                                             <61> 2 6391 3922
Orange Agricultural Institute               telephone work: <61> 2 6391 3815
Forest Rd, ORANGE, 2800, AUSTRALIA                    home: <61> 2 6362 0046

ASREML is currently free by anonymous ftp from pub/aar on ftp.res.bbsrc.ac.uk
    Point your web browser at ftp://ftp.res.bbsrc.ac.uk/pub/aar/ 
    in the IACR-Rothamsted information system  http://www.res.bbsrc.ac.uk/ 

To join the asreml discussion list, send the message  
     subscribe
to  asreml-request@chiswick.anprod.CSIRO.au

The address for messages to the list is asreml@chiswick.anprod.CSIRO.au

                        <> <> <> <> <> <> <>
"Seek first the kingdom of God and His righteousness"  Jesus; Matthew 6: 33
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>