# Predicted Probabilities Using Multi-level Logistic Regression

I am using PROC GLIMMIX to run a multi-level logistic regression model that contains a random intercept. I am outputting the predicted probabilities for each individual in my dataset, and then I am taking the average of these probabilities to get my average predicted probability over the entirety of the data.

My average predicted probability should equal $$\text{p} = exp(\pi)/(1+exp(\pi))\\$$

However, I am getting slightly different answers. For instance, when I output the predicted probabilities in GLIMMIX I get

$$p=.0482359$$

When I output the linear predictor I get $$\pi=-3.1041776$$

and $$exp(-3.1041776)/(1+exp(-3.1041776))=.0429352616\\$$

I don't know why I am not getting p=.0482359 for the last equation.

Does anyone know why this is?

Thanks.

• Could you explain why you think your first formula is correct? Where did it come from? – whuber Apr 28 '16 at 16:48
• I'm just using the logit link function, where $$\pi=\beta_0+...\beta_p\\$$ – bada bing Apr 28 '16 at 16:59
• But what does that have to do with average predicted probabilities? – whuber Apr 28 '16 at 18:35

• Thanks, Adam. So given the two options, it is 'more correct' to have GLIMMIX first transform to probabilities, and then average those probabilities? Instead of averaging the linear predictors, and then taking $$\text{exp}(\pi)/(1+\text{exp}(\pi))\\$$? Why do you think this is the better option? – bada bing Apr 28 '16 at 17:05