Graphing predicted probabilities with predictor variable
Posted: Mon Jan 21, 2013 8:32 pm
I have fitted a two-level random intercept logistic model with 3 predictors. I want to make a graph in MLwiN that plots this:
Although in my case I want to plot the predicted probabilities for increase in age.
I have tried customised predictions -> predict mean probabilities (with standardised age range from -3 to 3, in .25 steps) -> plot grid Y = pred.mean and X = pred.age
However this does not give me what I want, because it predicts the mean probability for the age when combined with every other category from the other predictor variables. And I would like to see only one probability per age value. I think I could fit a model with only age as predictor, however, this can give of course a wrong estimate because I don't control for other variables.
I have seen some examples in section 4.2 of the User Guide (http://www.bristol.ac.uk/cmm/software/m ... man-09.pdf) and section 2 of the Manual Supplement (http://www.bristol.ac.uk/cmm/software/m ... 0-supp.pdf), however these either plot logodds instead of probabilities, or use a grouping variable.
Although in my case I want to plot the predicted probabilities for increase in age.
I have tried customised predictions -> predict mean probabilities (with standardised age range from -3 to 3, in .25 steps) -> plot grid Y = pred.mean and X = pred.age
However this does not give me what I want, because it predicts the mean probability for the age when combined with every other category from the other predictor variables. And I would like to see only one probability per age value. I think I could fit a model with only age as predictor, however, this can give of course a wrong estimate because I don't control for other variables.
I have seen some examples in section 4.2 of the User Guide (http://www.bristol.ac.uk/cmm/software/m ... man-09.pdf) and section 2 of the Manual Supplement (http://www.bristol.ac.uk/cmm/software/m ... 0-supp.pdf), however these either plot logodds instead of probabilities, or use a grouping variable.