**Hello everyone,**

I am a new user of MLwiN and multilevel modelling too. I am writing an article both 2-level model and the 3-level model, which inspired by a great paper: An Original Stepwise Multilevel Logistic Regression Analysis (MLRA) of Discriminatory Accuracy: The Case of Neighbourhoods and Health

https://journals.plos.org/plosone/artic ... ne.0153778 . The dependent variable is dichotomous (0=not disease, 1=disease) which use the multivariable logistic regression for a binary response and the independent variables also in dichotomous (0=yes 1=not)

Would you please translate my variable below in order can be running into MLwiN. I see "runmlwin" should be quicker for MLRA on big datasets especially with three level models or if I want to put in random slope. Isn’t it?

Further, I have read the 9th of MLwiN User and the 10th of MLwiN MCMC Manual

9. Logistic Models for Binary and Binomial Responses (do | log)

10. Modelling Binary Responses (do | log)

However, I am a little bit confused to replicate into my hierarchical data, below

Districts (3rd level) _k : human development index (HDI)

Households (2nd level) _kj : knowledge of household

Individuals (1st level)_kji : gender, i.age, job

Outcome of this research : malaria prevalence

Would you please help me, to replicate do-file below in order can be run with “runmlwin” in ordering the analysis process that will be run by "Stata 14" and "MLwiN" trial version at the moment.

*The 2-level model*

MODEL 1 - Simple logistic regression analysis = SCAE

logit malaria gender i.age job

MODEL 2 - Multilevel logistic regression = SCAE + GCE

melogit malaria gender i.age job || district :

MODEL 3 - MLRA with neighbourhood = SCAE + GCE + SCE

melogit malaria gender i.age job HDI || district :

Multilevel logistic regression (MLRA) for malaria prevalence in two-level analysis.

MODEL 1 - Simple logistic regression analysis = SCAE

logit malaria gender i.age job

MODEL 2 - Multilevel logistic regression = SCAE + GCE

melogit malaria gender i.age job || district :

MODEL 3 - MLRA with neighbourhood = SCAE + GCE + SCE

melogit malaria gender i.age job HDI || district :

Multilevel logistic regression (MLRA) for malaria prevalence in two-level analysis.

I was translated the do-file into the Multilevel logistic regression (MLRA) for malaria prevalence in the two-level analysis. Using the trial version of MLwiN which have changed the location of the MLwiN_path global to the appropriate place, i.e. something like:global MLwiN_path "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe" and I have to click the "continue trial" button for each of my models are MLwiN is re-opened each time a new model is run. However, I am not sure if the syntax for MLwiN is true already; please suggest.

The data structure is hierarchical in the 2-level model with

Districts: ID District (2nd level)_j

Individuals: gender i.age job (1st level)_ij

*** generate constant**

gen cons = 1

* generate level-1 ID variable

gen id = _n

gen cons = 1

* generate level-1 ID variable

gen id = _n

** run with IGLS*

runmlwin malaria cons gender i.age job, level2(district: cons) level1(id: ) discrete(distribution(binomial) link(logit) denom(cons)) nopause

* run MCMC using IGLS values as starting values

runmlwin malaria cons gender i.age job, level2(district: cons) level1(id: ) discrete(distribution(binomial) link(logit) denom(cons)) mcmc(on) initsprevious nopause

runmlwin malaria cons gender i.age job, level2(district: cons) level1(id: ) discrete(distribution(binomial) link(logit) denom(cons)) nopause

* run MCMC using IGLS values as starting values

runmlwin malaria cons gender i.age job, level2(district: cons) level1(id: ) discrete(distribution(binomial) link(logit) denom(cons)) mcmc(on) initsprevious nopause

My questions are:

How to generate Simple logistic regression model, and denominator?

How to replicate S1 Stata. Stata do-file for running all the models, into to “runmlwin” if we want to measure the six (6) criteria, based on hierarchical data that we have

**1. Interclass correlation (ICC),**

2. Median odds-ratio (MOR),

3. 80% interval odds-ratio (IOR),

4. The proportion of opposed odds-ratios (POOR)

5. Proportion change in variance (PCV), and

6. Receiver operating characteristic (ROC): AU-ROC and AU-ROC change

2. Median odds-ratio (MOR),

3. 80% interval odds-ratio (IOR),

4. The proportion of opposed odds-ratios (POOR)

5. Proportion change in variance (PCV), and

6. Receiver operating characteristic (ROC): AU-ROC and AU-ROC change

Besides, I should perform the estimations using MCMC (this is an advice for all the analysis) that MCMC is available if I have MLwiN and can be run within stata as runmlwin command. Isn't it?

And how to replicate the three-level analysis below

Districts (3rd level) _k : human development index (HDI)

Households (2nd level) _kj : knowledge of household

Individuals (1st level)_kji : gender, i.age, job

Finally, if I have another data set, how to work and save like data below

S1 Model. MLwiN worksheet for running the equation of model 1 concerning utilization of a private versus public general practitioner.

https://doi.org/10.1371/journal.pone.0153778.s005

(WSZ)

S2 Model. MLwiN worksheet for running the equation of model 2 concerning utilization of a private versus public general practitioner.

https://doi.org/10.1371/journal.pone.0153778.s006

(WSZ)

S3 Model. MLwiN worksheet for running the equation of model 3 concerning utilization of a private versus public general practitioner.

https://doi.org/10.1371/journal.pone.0153778.s007

(WSZ)

S4 Model. MLwiN worksheet for running the equation of model 1 concerning utilization of psychotropic medication.

https://doi.org/10.1371/journal.pone.0153778.s008

(WSZ)

S5 Model. MLwiN worksheet for running the equation of model 2 concerning utilization of psychotropic medication.

https://doi.org/10.1371/journal.pone.0153778.s009

(WSZ)

S6 Model. MLwiN worksheet for running the equation of model 3 concerning utilization of psychotropic medication.

https://doi.org/10.1371/journal.pone.0153778.s010

(WSZ)

I am so sorry if my discussion is too long because I am beginner implementing "runmlwin" to Multilevel Logistic Regression Analysis.

Kind regards,