Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

I am interest in comparing specific level 2 groups using odds ratios and odds difference, is it possible to get credible intervals around these estimates in runmlwin? Thanks!

I think that you should be able to do this by loading the .dta file where you have saved the parameter chains and then running the mcmcsum command on the variable that corresponds to the parameter of interest. For details on the options for this command run:

Furthermore, when I load the .dta file where the parameter chains I stored, the only variables included are: iteration, deviance, FP1_cons, RP2_var_cons_, and OD_bcons_1; I don't see the residuals.

In your estimation command you requested that the residual chains at level-2 are stored in the file m1u.dta, so this is what you will need to open in order to calculate what you need. When running the mcmcsum on variables from the currently loaded dataset you need to specify the variables option when running the command, otherwise it will look for the chains saved as a mata matrix.

thank you so much! so that makes sense, although it looks like I can only use mcmcsum (with the variables option) if I use all the chains; when I try to use it on a subset (e.g., on the residual values for one group) I get an output that looks like this:

. mcmcsum u if group==1, variables
------------------------------------------------------------------------------
| Mean Std. Dev. ESS P [95% Cred. Interval]
-------------+----------------------------------------------------------------
policy | 0 0 0 45.000 0 0
------------------------------------------------------------------------------

So I'm assuming that means I cannot get credible intervals around group-specific effects?

bysort group (iteration): egen p_mean = mean(p)
bysort group (iteration): egen p_lo = pctile(p), p(2.5)
bysort group (iteration): egen p_hi = pctile(p), p(97.5)

where p is a variable for the group specific-predicted probability of the outcome (calculated from the residuals).

But then I run into issues when trying to compare two groups.

mcmcsum should work with subsets, so it may be a bug if that isn't working for you. A workaround would be to remove rows that do not correspond to the desired group before running the command, although the alternative code that you identified should be equivalent to what mcmcsum is doing for the mean and credible intervals anyway.