Skip to content
Prev 2738 / 5632 Next

[R-meta] Plotting interaction effect from a rma.mv() fit

Please keep the mailing list in CC.

That is not how predict() works for rma objects. If you want to obtain the predicted value for level 1 of the outcome factor when time = 1, you would use:

predict(fit, addx=T, newmods = c(0,0,0, 1, 0,0,0))

(the spaces in c() have no meaning, they are just there to make this easier to read)

For the other three levels, it would be:

predict(fit, addx=T, newmods = c(1,0,0, 1, 1,0,0))
predict(fit, addx=T, newmods = c(0,1,0, 1, 0,1,0))
predict(fit, addx=T, newmods = c(0,0,1, 1, 0,0,1))

Best,
Wolfgang
Message-ID: <2387123257244963ac5a91675de06788@UM-MAIL3213.unimaas.nl>
In-Reply-To: <CACgv6yUqmF9e5kpF2E=YpEGXsHZvWXk1V2xuo4qW-UfS602Afw@mail.gmail.com>