[R-meta] Difference of difference
Reza Norouzian
rnorouz|@n @end|ng |rom gm@||@com
Sat Feb 5 07:47:30 CET 2022
Dear Stefanou,
Adding a quick note that if you're comfortable with changing
"teaching_level:time" to "teaching_level*time", then the 7th
coefficient from the top in the new output tests the hypothesis you
mentioned.
res2 <- rma.mv(gi ~ 0 + teaching_level*time, vi, random = ~1|study/obs,
data = dd)
Kind regards,
Reza
On Sun, Jan 30, 2022 at 9:18 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer using 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
>
> >-----Original Message-----
> >From: Stefanou Revesz [mailto:stefanourevesz using gmail.com]
> >Sent: Sunday, 30 January, 2022 5:18
> >To: Viechtbauer, Wolfgang (SP)
> >Cc: R meta
> >Subject: Re: Difference of difference
> >
> >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 using maastrichtuniversity.nl> wrote:
> >>
> >> 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
> >>
> >> >-----Original Message-----
> >> >From: Stefanou Revesz [mailto:stefanourevesz using gmail.com]
> >> >Sent: Thursday, 27 January, 2022 22:37
> >> >To: R meta
> >> >Cc: Viechtbauer, Wolfgang (SP)
> >> >Subject: Difference of difference
> >> >
> >> >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
> _______________________________________________
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
More information about the R-sig-meta-analysis
mailing list