Hello,
I am looking for some guidance
setting up my comparison matrix to determine differences between
treatments while accounting for pre-treatment baseline levels. My first
treatment has a temperature component "HS" and my second treatment has
two components temperature + protein inhibitor "Inh". They both have the
same baseline measurement "BL". There is also a time component with
experimental measurements taken over two days "XP1" and "XP2". I am
comparing changes seen in each treatment to the baseline.
My
comparison matrix is set up in the attached image; however, I do not
think my last two comparisons are set up for what I want to compare.
I want to compare the differences seen in "HS-BL" to the differences seen in "Inh-BL". Can you help me set this up?
Code to set up this matrix is as follows:
comp1 <- matrix(c(-1,1,0,0,0),nrow=1)
comp2 <- matrix(c(-1,0,1,0,0),nrow=1)
comp3<- matrix(c(-1,0,0,1,0),nrow=1)
comp4 <- matrix(c(-1,0,0,0,1),nrow=1)
comp5 <- matrix(c(-2,1,1,0,0), nrow=1)
comp6 <- matrix(c(-2,0,0,1,1), nrow=1)
trt_compare<- rbind(comp1,
comp2,
comp3,
comp4,
comp5,
comp6)
row.names(trt_compare)
<- c("XP1_HS-BL", "XP1_Inh-BL", "XP2_HS-BL","XP2_Inh-BL",
"(XP1_Inh-BL)-(XP1_HS-BL)", "(XP2_Inh-BL)-(XP2_HS-BL)")
trt_groups<- as.matrix(c("BL", "XP1_HS", "XP1_Inh", "XP2_HS", "XP2_Inh"))
trt_groups
colnames(trt_compare) <- trt_groups
trt_compare
Thank you so much!
-Frank Fabela