Hello list,
I'm analyzing data (variable names in brackets) generated by a 4-period [period], 3-treatment [trt] crossover design.
The design was strongly balanced (all treatments preceded all others, including itself) and uniform within period (all treatments occurred the same # of times in each of the 4 periods).
This produced 18 distinct sequences of treatments (e.g., ABCC, CAAB, etc.), to which a single individual [id] was randomly assigned.  Two covariates [cov1, cov2] were also measured on each individual.
The response [y] was continuous, and each individual was associated with a pre-study baseline measure [y0].
Because a single individual was assigned to each sequence, I believe that a random effect for each individual will capture individual, baseline, and sequence effects (they're perfectly confounded).
The question is simple: does the response differ among treatments?
I'm hoping the correct specification is as simple as I think it is, illustrated below with mock data.
My specific questions:
1 - Does this model correctly capture treatment, period, and potential carryover effects?  As I understand it, in a strongly balanced design such as this, carryover and treatment effects are not confounded, so my assumption is that I don't have to specify any addition variable to capture this effect (e.g., a variable indicating the treatment in the preceding period).  I'm happy to be corrected.
2 - Is an interaction between treatment and period prescribed?  Because the design is uniform within periods, I believe that period and treatment effects are likewise not confounded.
3 - Does the random effect for each individual captures variation due to individual, sequence, and baseline measurement?
Thanks very much for your assistance,
Adam SmithDepartment of Natural Resources ScienceUniversity of Rhode Island
 
# Download datadatURL <- "https://dl.dropboxusercontent.com/u/23278690/xover_test.csv"dat <- repmis::source_data(datURL, sep = ",", header = TRUE)dat <- within(dat, {
              id = factor(id)              trt = factor(trt)              period = factor(period)              cov1 = factor(cov1)              cov2 = factor(cov2)              })
require(lme4)
# Proposed linear mixed model analysismod1 <- lmer(y ~ trt + period + cov1 + cov2 + (1|id), data = dat)
# Test global treatment effect, for example...mod2 <- update(mod1, . ~ . - trt)
anova(mod1, mod2)
sessionInfo()

R version 3.0.3 (2014-03-06)Platform: x86_64-w64-mingw32/x64 (64-bit)
attached base packages:[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:[1] car_2.0-19      AICcmodavg_1.35 lme4_1.1-5      Rcpp_0.11.1     Matrix_1.1-3    plyr_1.8.1      		 	   		  
	[[alternative HTML version deleted]]

