Meta-regression with circular outcome with brms

Dear Stan community,

I’m wanting to perform meta-regression with a circular outcome. However, using the family=von_mises() is incompatible with the response being yi | se(sei) ~. I get the following error:
“Error: Argument ‘se’ is not supported for family ‘von_mises(tan_half)’.”

I don’t get the same error when using the inverse of the standard error as weights:
yi | weights(1/sei) ~

Are these equivalent, is there any problem in performing meta-regression in this way, or is there any workaround to use se() with the von misses family?


1 Like

I think using weights(1/sei) is somewhat different to having se(sei) (although I am not 100% sure about this). Weights will multiply the likelihood contribution of each point and keep sigma (the standard deviation) as a free parameter. OTOH se will fix the standard deviation of the response distribution to the one given in the data (you can always use make_stancode to see what the model does under the hood).

You can workaround this limitation by writing a custom family that would use von_mises as a single parameter distribution while getting the kappa parameter from data via the vreal construct. (note that kappa however is not the standard deviation of the distribution, so some additional math will be needed). If the instructions seem mysterious even after reading the vignette on custom families (linked earlier), please ask for further clarification.

The best for metanalysis is obviously when you have access to raw data from the individual studies and build a big model with all the data, rather then relying on summaries, but that’s unfortunately not always possible.

I should also note that von_mises can be tricky to fit in general, because the Stan implementation has to (for technical reasons) introduce an artificial boundary somewhere around the circle and you need to ensure that boundary is far from “where the action is happening”.

Best of luck with the model!

1 Like