dmphillippo / multinma

Network meta-analysis of individual and aggregate data in Stan
https://dmphillippo.github.io/multinma
35 stars 17 forks source link

Fix contrast-based aggregate data resdev names #19

Closed ndunnewind closed 2 years ago

ndunnewind commented 2 years ago

In a model with only contrast-based aggregate data, study names are incorrectly converted to integers when setting the resdev names in fnames_oi. This happens because the .study column is a factor, which is converted into an integer vector when concatenating with NULL. This PR proposes to convert to a character vector, which can be safely concatenated with NULL.

This causes the labels in DIC plots to appear as seemingly random integers, instead of the study names.

dmphillippo commented 2 years ago

Good spot, thanks!