[R-sig-ME] How to select (and nest) covariates in a crossed design model?
Mari Laine
mslain at utu.fi
Sat Jul 16 01:02:10 CEST 2011
Thank you for the quick reply. First, I’ll try to explain my experiment more clearly. The study was done in two separate, enclosed areas, which were of the same size and fairly similar in their environment and animal density. I would still like to account for their differences by including the area as a covariate (because I know there were some differences between them that simply could not be helped). Three session levels were assigned, aiming to control for pre-experiment differences between enclosures (before) and to measure the immediate (during) and later response (after) to the treatment. During each session, both of the enclosed study areas were measured once per day, three days in a row, to have three observations of each session. Animal densities within areas were monitored, and the response variables were then scaled according to those densities. The experiment was repeated with reversed treatments, with precisely the same time intervals as the first experiment.
(1) Experiments 1 and 2 were identically replicated, having the same sessions (though done at two consequent periods) and number of observations. Only the treatments were reversed to reduce the impact of areas.
Study units are the areas A and B, where a compiled response was measured (from 50 separate, evenly distributed points, and then summed up), and scaled by the density of animals present in the enclosed area. So observations of areas A and B were always conducted on the same day (= on the same round), thus forming a pair.
(2) I have a day-variable on my data, but I think using e.g. session number (from 1-6, sessions 1-3 repeated twice) would be a useful time variable. Also rounds (1-18) act as a time variable, representing the days when actual measurements were taken (omitting those days in between).
(3) “Before“ - session level (including three observation, as do all sessions) was measured four times: in both areas during both experiments. The role of this session level was indeed to represent a baseline measure, and to see how comparable the two areas were to begin with. Related to question (4), it was also useful when estimating whether time lag between the switching of regimes was sufficient.
I’ve considered nesting the session numbers within experiments (experiment 1 & session 1-3, experiment 2 & sessions 3-6), but my problem is that sessions are conducted precisely in the same way in both experiment times (“before”, “during” and “after” x2). Also, is it a problem to use two interrelated factors, one as fixed and one as random? Or possibly even the same variable ("session") in both categories at the same time?
As said, round observations would be useful mainly to quantify measurement error within session. Perhaps then I should simplify my data table and use round-means as a session observation, instead of using 3 separate round values?
I decided to use generalized linear mixed model, because the response variable is not normally distributed, but requires a log link function. The study is also supposed to include similar data from following year, but I had some problems with the experimental set up, so I'm currently looking at only one year. I hope this information helps with the obscurity and makes it easier to evaluate, which kind of model would fit my data, or whether the data contains too few repetitions to be properly analysed at all.
- Mari -
----- Original Message -----
From: Dennis Murphy <djmuser at gmail.com>
Date: Friday, July 15, 2011 2:23 pm
Subject: Re: [R-sig-ME] How to select (and nest) covariates in a crossed design model?
To: Mari Laine <mslain at utu.fi>
Cc: r-sig-mixed-models at r-project.org
> Hi:
>
> Your terminology is slightly amiss. A (completely) crossed design for
> two treatment factors is one in which all levels of one factor occur
> in combination with all levels of the second factor. In a crossed
> design, experimental units are randomly assigned to factor
> combinations. Your description conforms to that of a 2 x 2 crossover
> design, in which the treatment assignments within subjects at time 1
> are reversed at time 2; i.e., treatments comprise one within-subject
> factor and time another. In a mixed model context, the treatments and
> periods would normally be treated as fixed effect factors.
>
> Some things are not clear to me and may have an effect on the form of
> the model you eventually fit:
>
> (1) Do you have replicated sets of matched pairs in areas A and B or
> is this a completely 'within-subject' design with the two areas as
> experimental units? If replicated,
> * what are the individual experimental units and how does the
> matching take place between areas A and B?
> * what randomization, if any, occurred within pairs?
> * are individuals 'naturally' associated with areas or are they
> [randomly] assigned to areas?
> (2) The 2 x 2 crossover occurs at the Area (top) level. Do you have a
> time variable defined that corresponds to when the regimes were
> switched for each pair?
> (3) What is the role of 'before' and why is it measured in each of
> three sessions? I presume that 'before' is intended to represent a
> baseline measure of some sort, but if that's the case, what is the
> point of the crossover and what then is the role of the control? [This
> is not meant to be a rhetorical or provocative question---my
> presumptions may well be wrong.]
> (4) Is there a sufficient time lag between the switching of regimes to
> wash out the treatment effect of those assigned the treatment
> condition at time 1? This is a major concern in crossover studies as
> it has an impact on the validity of inferences about treatments
> assigned within subject.
>
> From what you've described, it appears that session is nested* within
> area (or subject) and rounds are nested within session. Sessions could
> be treated as a repeated measures factor. The rounds appear to occur
> within the same session, so those measurements are basically
> triplicates ('pseudo-replication'). They would be useful to quantify
> measurement error within session, but not much else.
>
> [* Factor B is said to be nested within factor A if the levels of
> factor B occur in combination with only one level of factor A. By
> definition, nested factors cannot interact with one another in the
> context of a statistical model.]
>
> The point of these questions is that it seems inappropriate to
> postulate a reasonable model on the basis of what you've presented
> thus far. My concern is that if areas A and B are the only two
> experimental units in your study (i.e., the only two units to which
> treatments were assigned), you have a big problem because you would
> have zero degrees of freedom for error to test the treatment or time
> effects. That's what prompted the questions posed above.
>
> HTH,
> Dennis
>
>
>
> On Fri, Jul 15, 2011 at 12:26 AM, Mari Laine <mslain at utu.fi> wrote:
> > Hi all,
> >
> > I have difficulties in building a proper model for my experimental
> data. The study was done in two areas, A and B. A received a test
> treatment and B acted as a control, and then the experiment was
> repeated with inversed treatments, making it a crossed design.
> Response was measured in three sessions per treatment per area:
> before, during and after the treatment. Each session included 3
> consecutive observations (called rounds).
> >
> > I'm interested in the impact of treatment (test vs. control), and
> whether it is related to sessions or not. I've built a generalized
> linear mixed model, and placed "treatment", "session" and their
> interaction as fixed factors. My problem with the model is that, in
> addition to "experiment", I'm not quite sure what to include in random
> (or repeated?) factors and whether to nest these factors or not. I've
> browsed the web for examples that would include using a 2x3 (or 2x2)
> crossed design with multiple observations within a cell, but I've
> found none.
> >
> >
> > Here is a data table resembling the one I'm using in my analysis:
> >
> > Area A
> > experim treatm before during after
> > 1 c 1.80 0.44 0.71 2.08 1.10 1.48 2.45
> 1.64 3.88
> > 2 e 6.11 4.66 5.40 6.98 4.57 5.39 7.83
> 6.31 7.25
> >
> > Area B
> > experim treatm before during after
> > 1 e 1.96 2.08 2.20 0.92 1.34 1.42 0.59
> 1.02 1.76
> > 2 c 1.45 2.41 4.62 2.55 5.31 3.75 5.03
> 8.24 1.28
> >
> >
> > And the same data in an importable form:
> > area experim treatment session sessnro round response
> > A 1 c before 1 1 1.80
> > A 1 c before 1 2 0.44
> > A 1 c before 1 3 0.71
> > A 1 c during 2 4 2.08
> > A 1 c during 2 5 1.10
> > A 1 c during 2 6 1.48
> > A 1 c after 3 7 2.45
> > A 1 c after 3 8 1.64
> > A 1 c after 3 9 3.88
> > A 2 e before 4 10 6.11
> > A 2 e before 4 11 4.66
> > A 2 e before 4 12 5.40
> > A 2 e during 5 13 6.98
> > A 2 e during 5 14 4.57
> > A 2 e during 5 15 5.39
> > A 2 e after 6 16 7.83
> > A 2 e after 6 17 6.31
> > A 2 e after 6 18 7.25
> > B 1 e before 1 1 1.96
> > B 1 e before 1 2 2.08
> > B 1 e before 1 3 2.20
> > B 1 e during 2 4 0.92
> > B 1 e during 2 5 1.34
> > B 1 e during 2 6 1.42
> > B 1 e after 3 7 0.59
> > B 1 e after 3 8 1.02
> > B 1 e after 3 9 1.76
> > B 2 c before 4 10 1.45
> > B 2 c before 4 11 2.41
> > B 2 c before 4 12 4.62
> > B 2 c during 5 13 2.55
> > B 2 c during 5 14 5.31
> > B 2 c during 5 15 3.75
> > B 2 c after 6 16 5.03
> > B 2 c after 6 17 8.24
> > B 2 c after 6 18 1.28
> >
> >
> > Thanks,
> > Mari Laine
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
More information about the R-sig-mixed-models
mailing list