Using 'cor_brms' objects for 'autocor' is deprecated. Please see ?cor_brms for details

This depends on how you write it down. In the link you provided, the following multivariate model is fitted:

res ←, V, mods = ~ outcome - 1, random = ~ outcome | trial, struct=“UN”, data=dat, method=“ML”)

This can be translated into brms as follows:

res2 ← brm(yi ~ outcome - 1 + (outcome - 1 | trial), data = dat, autocor = cor_fixed(V))

I try to use brms to introduce VCV matrix for meta-analysis, I saw this code, but when I tried to run it I got an error:

Error: Invalid addition arguments for this model.
In addition: Warning messages:
1: Argument ‘autocor’ should be specified within the ‘formula’ argument. See ?brmsformula for help.
2: Using ‘cor_brms’ objects for ‘autocor’ is deprecated. Please see ?cor_brms for details.

How should I correct this code, thanks!

The use of auto_cor = cor_fixed(V) has been replaced by using fcor(V) within the model formula. So your model would be:

res2 <- brm(yi ~ outcome - 1 + fcor(V) + (outcome - 1 | trial), data = dat)

Thank you so much!

1 Like