Date: Tue, 30 Jan 2001 10:22:48 -0800
Reply-To: Dale McLerran <dmclerra@MY-DEJA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <dmclerra@MY-DEJA.COM>
Subject: Re: CROSS-OVER EXPERIMENT and proc MIXED... HELP!
Content-Type: text/plain
Diego,
The combination of the variables TREATMENT and ORDER define your
blocks. Therefore, blocks do not need to be included in the
model, but treatment, order, and the treatment by order interaction
should all be included explicitly among the fixed effects for the
model. The laying order should also be included among the fixed
effects. Whether laying order should be included as a
continuous covariate or as a classification effect may be open
to question. If laying order is entered as a continuous effect,
then you would be assuming that egg weight is linearly related
to laying order. If laying order is entered as a classification
effect, then no such assumption is made, although you can perform
a linear trend test. The latter is the model which I would favor
for a couple of reasons. First, while there may be a linear trend,
the relationship of egg weight to laying order may not be exactly
linear. A linear trend is encompassed in an all kinds of
nonlinear functions: S-shaped curves, curves which increase
steeply at first and then approach an asymptote, exponential
growth curves (not likely here, but included just for reference),
and many, many more. Second, laying order will have to be included
as a classification effect in your model to allow for correlation
of errors within a clutch. This will be represented through a
REPEATED statement, which uses laying order as an effect. Thus,
in order to use laying order as a continuous variable (in the fixed
effects portion of the model) and to use laying order as a
classification variable (for the REPEATED measures structure),
you would need two variables with exactly the same structure
(say LAYCLASS and LAYCONT, where LAYCLASS=LAYCONT). While this
is not difficult to program, it is perhaps conceptually a little
difficult. Thus, the model which I will present will use laying
order as a classification effect.
First, let's consider the fixed effects in the model. You do
need to include among the fixed effects: 1) treatment, 2) order,
3) treatment*order, 4) laying order, and 5) number of eggs in the
clutch. Of course, you would hope that the treatment*order
interaction is nonsignificant, but it may not be. That is why you
need the crossover design, to allow for the possibility that
treatment order affects treatment effects. Thus, the model
statement will read
model wgh = trt|order lay count / s;
Now we need to consider the sources of variation within the
experiment. Each female may lay eggs of different weights,
depending on her overall health and genetic makeup. Thus, we
need to allow for female to female variation in average egg
weight. On top of that, there will be egg variability within
each clutch. Moreover, there will probably be correlation
of the errors within each clutch: if one egg weight is greater
than expected (considering the fixed effects model), then any
other egg is likely to be heavier than expected. We need to
allow for this correlation of errors. There is one other
thing which we should consider among the random effects, which
is that even though genetic and health factors may tend to
result in higher egg weights for some females than others, high
egg weights at time 1 may be correlated with low egg weights
at time 2, and vice versa. Thus, we may see more variation
within canaries than between canaries in average egg weight.
In order to account for this possibility, we actually need to
allow the variance component for the female effect to go negative.
Thus, the sources of random effects should be modelled through
the following statements:
random fem;
repeated lay / subject=fem*clutch type=?;
Note that I have not specified what the structure of the egg to
egg error covariance should be. There are several possibilities
that you might consider: compound symmetric (CS), autoregressive
(AR(1)), or unstructured (UN). In order to allow the variance
estimates from the random statement to go negative, you need to
remove the zero boundary constraint on the variances. You can
do this with the NOBOUND option on the invocation of PROC MIXED.
Putting it all together, the model which I believe would work
for you is:
proc mixed data=mydata nobound;
class trt order lay count fem clutch;
model wgh = trt|order lay count / s;
random fem;
repeated lay / subject=fem*clutch type=?;
run;
Now, let me take you one step further. The females who do not
lay in a particular clutch present some problems here. They
will probably have greater egg weights in the other clutch.
There may be a number of ways that this could be handled, but
you really should do something here. Probably the easiest and
most defensible thing to do is to create an indicator variable
of whether the female laid in the other clutch. If she laid
there, then her egg weights in the current clutch will be
lower. You could add this indicator variable to the fixed
effects. More sophisticated models would model simultaneously
the joint likelihood of laying at all, with the weights of the
eggs given that the canary did lay. However, there is not
software off the shelf for doing this that I know of, and it
can get quite messy.
Hope this helps.
>Date: Tue, 30 Jan 2001 11:17:30 +0100
>Reply-To: Diego GIl <dgil@SNV.JUSSIEU.FR>
>From: Diego GIl <dgil@SNV.JUSSIEU.FR>
>Subject: CROSS-OVER EXPERIMENT and proc MIXED... HELP!
>To: SAS-L@LISTSERV.UGA.EDU
>
>Hi there,
>
>I'm desperate for some help, after a week of browsing manuals. Thanks
>for any advice you can give me.
>
>I've to analyse the results of an experiment with repeated measures (a
>cross-over design), and I do not know whether I should do a nested model
>in GLM, or use a specific REPEATED MEASURES in a MIXED procedure.
>Somebody told me that the latter is best because of my uneven sample
>sizes.
>
>This was an experiment designed to see how two different treatments
>influence the weight of eggs laid by female canaries. The experiment was
>a cross-over design, with two groups of females, each going through the
>two treatments (A, B), but in different order. Thus:
>
> 1 clutch 2nd clutch
>Block 1 A B
>Block 2 B A
>
>An additional factor is laying order, as we know that within a clutch,
>egg weight increases with laying order. The design is unbalanced, as not
>all subjects laid clutches in the two groups, or in both treatments, nor
>the same number of eggs in each clutch. Thus:
>
>WGH dependent variable
>TRT 1 2
>ORD 1 2
>BLO 1 2 (is BLO necessary??)
>LAY 1 2 3 4 5 (covariate??)
>FEM 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
>
>What interests me is the effect of TRT, controlling for female
>differences and within clutch LAY variation. I also need to know if ORD
>or TRT*ORD are important, although if they aren't I would very happily
>take them away from the model. An additional question is whether the
>slope of the covariate LAY is the same between the two TRT levels.
>
>I do not know if I should nest TRT within FEM, or do this with the
>REPEATED command, whether to use random for BLO....
>
>Thanks awfully for any advice you can give me.
>
>
>Diego Gil
>
>Laboratoire d'Ecologie (CNRS UMR 7625)
>Universite Pierre et Marie Curie
>Bat. A, 7eme etage
>7, quai St. Bernard, Case 237
>F-75252 Paris Cedex 5
>France
>
>Tel.: +33 1 44 27 38 23
>Fax.: +33 1 44 27 35 16
>E-mail: Diego.Gil@snv.jussieu.fr
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@fhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
------------------------------------------------------------
--== Sent via Deja.com ==--
http://www.deja.com/
|