Predicted probabilties for multivariate logistic multilevl model

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!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
francescomolteni
Posts: 7
Joined: Mon Oct 19, 2015 3:11 pm

Predicted probabilties for multivariate logistic multilevl model

Post by francescomolteni »

dear all, I am running this multivariate logistic multilevel model:

unmlwin ///
(Practice cons cohort2 cohortsqr Mixed Protestant Orthodox MixedXcohort ProtestantXcohort OrthodoxXcohort MixedXcohortSQR ProtestantXcohortSQR OrthodoxXcohortSQR Female Wave_2 Wave_3 Wave_4 , equation(1)) ///
(BeliefGHH cons cohort2 cohortsqr Mixed Protestant Orthodox MixedXcohort ProtestantXcohort OrthodoxXcohort MixedXcohortSQR ProtestantXcohortSQR OrthodoxXcohortSQR Female Wave_2 Wave_3 Wave_4 , equation(2)) ///
(Definition cons cohort2 cohortsqr Mixed Protestant Orthodox MixedXcohort ProtestantXcohort OrthodoxXcohort MixedXcohortSQR ProtestantXcohortSQR OrthodoxXcohortSQR Female Wave_2 Wave_3 Wave_4 , equation(3)) ///
, ///
level2(S003: (cons cohort2 , reset(all) eq(1)) (cons cohort2 , reset(all) eq(2)) (cons cohort2 , reset(all) eq(3))) ///
level1(id: ) ///
discrete(distribution(binomial binomial binomial) link(logit) denominator(cons cons cons) pql2 ) ///
mlwinsettings(size(200000) optimat) rigls

The model converged. My question is: how can I plot predicted probabilities for each outcome Vs cohort (and divided by religious denomination). It is an easy issue in mlwin but seems very complicated working within stata. The situation is even more complicated because factor notation is not allowed in these kind of models and you have to create and specify each dummy variable and each interaction term.

Thank you !!
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Predicted probabilties for multivariate logistic multilevl model

Post by GeorgeLeckie »

Dear francescomolteni ,

I'm afraid there is no automated way to do this. You will have to do the calculations by hand from first principles.

Module 7 of the lemma training materials and in particular the accompanying runmlwin do-files may be of some help. See for example section 7.5

http://www.bristol.ac.uk/cmm/software/r ... /examples/

Best wishes

George
Post Reply