I'm trying to compare two contrasts from different models (each model from data from different individuals), and I'm wondering if that is possible using the estimate, SE and t.ratio information from each contrast.
Just as an example, let's pretend I have two independent models mod1 and mod2:
data1 <- mtcars[1:2]
data$cyl <- factor(data$cyl)
rownames(data) <- paste("id",1:nrow(data), sep="")
mod1 <- lm(mpg ~ cyl, data=data)
data2 <- mtcars[1:2]
data2$cyl <- sample(data$cyl)
names(data2)[names(data2) == 'cyl'] <- 'cyl2'
rownames(data2) <- paste("id",1:nrow(data2)+nrow(data2), sep="")
data2$mpg = runif(length(data$mpg))
names(data2)[names(data2) == 'mpg'] <- 'mpgrand'
mod2 <- lm(mpgrand ~ cyl2, data=data2)
Using emmeans to compute the contrasts:
em1 <- emmeans(mod1, pairwise~cyl)
em2 <- emmeans(mod2, pairwise~cyl2)
em1$contrasts
contrast estimate SE df t.ratio p.value
cyl4 - cyl6 6.92 1.56 29 4.441 0.0003
cyl4 - cyl8 11.56 1.30 29 8.905 <.0001
cyl6 - cyl8 4.64 1.49 29 3.112 0.0112
em2$contrasts
contrast estimate SE df t.ratio p.value
cyl24 - cyl26 -0.0371 0.129 29 -0.288 0.9554
cyl24 - cyl28 -0.0233 0.107 29 -0.218 0.9743
cyl26 - cyl28 0.0137 0.123 29 0.111 0.9932
Since I know the estimate, SE, df and t.ratio values of each contrast, can I now somehow compare em1's first contrast
contrast estimate SE df t.ratio p.value
cyl4 - cyl6 6.92 1.56 29 4.441 0.0003
with em2's first contrast
contrast estimate SE df t.ratio p.value
cyl24 - cyl26 -0.0371 0.129 29 -0.288 0.9554
in order to claim that the em1 contrast value is significantly greater than the em2 contrast value?