Analysis of a coss-over trial

I am trying to analyze a cross-over trial and check for a carry-over effect between the periods, a tratment-effect and a period-effect.
I just need to check this with a t-test. But I am not sure how to put the estimators in the t-test, because to estimate the effects, there need to be summated or subtracted from each other. But if I do this first, I have only one value left and then I cannot use a t-test.

It would help if someone has experice in analysing a cross-over study and in estimating the effects

#crossover effect
t<-t.test((dat1[,1]+dat1[,2]), (dat2[,1]+dat2[,2]), var.equal = TRUE, conf.level = 0.9)$p.value
#needs to be the difference: dat1[,1]+dat1[,2]) -(dat2[,1]+dat2[,2]

b<-t.test((dat1[,1]-dat1[,2]), (dat2[,2]-dat2[,1]), var.equal = TRUE)$p.value
#needs to be the sum: dat1[,1]-dat1[,2])+(dat2[,2]-dat2[,1]

p<-t.test((dat1[,1]-dat1[,2]), (dat2[,1]-dat2[,2]), var.equal = TRUE, conf.level = 0.9)$p.value
#needs to be the sum: dat1[,1]-dat1[,2])+(dat2[,1]-dat2[,2]

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.