1
$\begingroup$

I am running a fixed effects hazard ratios model with WinBUGS and I can't tell if I've run into a potential problem.

In the stats output, my mean and median are similar, but generally differ by approximately 0.05. I seem to have the results I should have been expecting, however, and the model runs smoothly.

I need help to understand two things:

Firstly, do differing values for median and mean affect suggest there is an issue with my code? Particularly with regards to convergence. In my opinion this just means the posterior distribution isn't symmetrical.

Secondly, which do I use when analysing these results? Usually I would stick with using the median but I'm starting to question this. The ranking data use the mean, should I use mean for hazard ratios too?

I hope this makes sense.

Thanks in advance.

$\endgroup$
1
$\begingroup$

You are absolutely right that the discrepancy between mean and median just indicates that the posterior distribution isn't symmetrical. This isn't at all unusual, except for very simple problems and/or very large datasets. In particular, it does not necessarily indicate problems with convergence (although you should be using other methods to ensure convergence!).

As far as I am aware there is no standardisation of the choice of which summary statistic to use - it depends partly on personal preference. You could also choose an estimate of the mode which is conceptually appealing as the 'most likely' value - see the modeest package for a way to do this in R. I would tend to report the median and 95% CI estimates, but in this case if you are using the mean for something else it may be a good idea to be consistent.

However, remember that simple summary statistics do not give the full story - particularly in the case of posteriors with complex shapes. For example, if the posterior is bimodal then neither the mean nor the median is a helpful summary statistic, as they may not represent a parameter value with very much support in the posterior. It is therefore essential to at least examine graphical summaries of the full distribution (either histogram, density plot, or my favourite the ECDF plot), and in many cases it is a good idea to include these as e.g. an appendix to a thesis or manuscript.

$\endgroup$
  • $\begingroup$ Thanks a lot for this answer. You've confirmed my own thoughts, but it was questioned by someone senior at work who suggested otherwise. It's difficult to answer a question like this when you can't give a solid justification for your thoughts. But this will be very useful for the future! $\endgroup$ – Tom Jul 3 '17 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.