I am analyzing an experiment comparing the effect of treatment A vs. B on the matched subject. Here are the measurements on 34 subjects:
A B
-1.15 -1.16
-1.13 -0.94
-0.16 -1.18
-0.37 -1.20
-1.09 -1.20
-1.20 -1.20
-0.94 -1.20
-0.84 -1.16
-1.18 -1.17
-1.20 -1.11
-0.78 -0.68
-0.83 -0.73
-1.05 -1.20
-0.71 -1.20
0.07 0.12
-1.20 -0.98
-1.20 -1.20
-1.02 -1.17
-0.28 -0.84
1.33 1.47
-1.19 -1.20
-1.20 -1.17
-0.40 -1.20
0.66 -0.21
-0.63 0.21
-0.88 -1.16
-0.46 -1.20
-0.76 -1.20
-0.38 -1.20
-0.67 -0.97
-0.90 -1.20
-0.90 -1.20
-1.20 -1.15
-1.01 -0.79
The differences between the two treatment (dat[,"A"]-dat[,"B"]) looks normally distributed. I first applied a paired t-test:
t.test(dat$A, dat$B, alternative = c("two.sided"), mu = 0, paired = TRUE)
Paired t-test
data: dat$A and dat$B
t = 2.894, df = 33, p-value = 0.006692
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.05870022 0.33659390
sample estimates:
mean of the differences
0.1976471
The paired t-test indicates that on average treatment A has a significantly higher measurement than treatment B.
On the other hand, I applied a linear model on A~B:
mod1 <- lm(A ~ B, data=dat)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.03345 0.12739 -0.263 0.795
B 0.75111 0.11801 6.365 3.79e-07 ***
The 95% confidence interval of the coefficient for B (0.51-0.99) does not cover 1. This result indicates that treatment A has on average a smaller measurement than treatment B, which is contradictory to the findings from the t-test.
Can anyone help me to explain these contradictory findings?
and to expand my question: Does a paired t-test (test mean of difference against 0) equal to a linear regression without intercept (test the coefficient against 1)? I mean in terms of testing against the null hypothesis, rather than the estimate or the meaning of the coefficient. Because both tests are testing against the null hypothesis that $B_{i}-A_{i}=\epsilon_{i}$.