Skip to content

[R-meta] Difference of difference

4 messages · Stefanou Revesz, Wolfgang Viechtbauer

#
Dear Wolfang and the list Members,

I've done a post-hoc after my 3-level model. Below is part of the results.

At Baseline, elementary was larger than the mixed group by .251 (ignore pval).

At post-test1, elementary was larger than the mixed group by .467 (ignore pval).

Shall we again subtract the baseline difference from the post-test1
difference to better understand the difference between mixed and
elementary groups at post-test1?

If yes, can we then conduct a test on that difference and get CIs for it?


Diff       SE       tval   Df   pval
mixed Baseline - elementary Baseline      -0.251   0.277  -0.905   55 0.984
mixed Post-test1 - elementary Post-test1  -0.467   0.251  -1.861   55 0.582

Thank you so much,
Stefanou
#
Hi Stefanou,

It's certainly something you can do.

anova() can provide a test of such a contrast and predict() will give you the CI.

Best,
Wolfgang
1 day later
#
Thank you so much, Wolfgang. I must admit that I failed at achieving
this on my own. In my model below, I want to test:
(coef 4 - coef 1) - (coef 5 - coef 2)

Would that be possible either in anova.rma() or in clubSandwich::Wald_test()?

dd <- read.csv("https://raw.githubusercontent.com/fpqq/w/main/1.csv")
dd$obs <- 1:nrow(dd)

res <- rma.mv(gi ~ 0 + teaching_level:time, vi, random = ~1|study/obs,
data = dd)

Many thanks,
Stefanou

On Fri, Jan 28, 2022 at 9:54 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
#
Start by reading:

https://wviechtb.github.io/metafor/reference/anova.rma.html
https://wviechtb.github.io/metafor/reference/predict.rma.html

And lots of examples here:

https://www.metafor-project.org/doku.php/tips:testing_factors_lincoms
https://www.metafor-project.org/doku.php/tips:multiple_factors_interactions

And here:

https://www.metafor-project.org/doku.php/tips:models_with_or_without_intercept

Best,
Wolfgang