R2MLwiN - 'mlwin.exe' is not recognized

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN 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 R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
Post Reply
Posts: 1
Joined: Sat Sep 20, 2014 10:49 am

R2MLwiN - 'mlwin.exe' is not recognized

Post by Rakesh84 »

Dear all,

I am currently trying to run a two-level model. I have downloaded the 30-day trial of MLwiN (version 2.30).
The following specifications were set in R:

MLwiN filepath: mlwin="H:/MSc/MSc Project/Project Data/Datasets" ## Is this the correct file path? I am unable to locate the MLwiN.exe file. I can however locate the MLwiN.msi file ##

Dataset: indata15=read.table("mcar15.dat")
Specified Levels: levID=c("school", "pupil") # School=level 2, pupil=level 1
Model: model.mcar15="nlitpost~(0|cons_)+(1|cons_+gend+fsmn+pupil)+(2|cons_+school)"
Estimation method: estoptions=list(EstM=1)
Distirbution: D="Normal"
## Note: The code runs up to this point ##
runMLwiN(model.mcar15, levID, D, indata15, estoptions, MLwiNPath=mlwin)

Following execution of the above, the following output is displayed in R:
> runMLwiN(model.mcar15, levID, D, indata15, estoptions, MLwiNPath=mlwin)
MLwiN is running, please wait......
'mlwin.exe' is not recognized as an internal or external command,
operable program or batch file.
Error in read.dta(MCMCfile) :
unable to open file: 'No such file or directory'
In addition: Warning messages:
1: running command 'C:\windows\system32\cmd.exe /c mlwin.exe /nogui /run C:/Users/RAKESH~1/AppData/Local/Temp/RtmpQXDzgd/macrofile_1df46aaa5119.txt' had status 1
2: In shell(cmd) :
'mlwin.exe /nogui /run C:/Users/RAKESH~1/AppData/Local/Temp/RtmpQXDzgd/macrofile_1df46aaa5119.txt' execution failed with error code 1

Can someone please help me to resolve this issue? I have a feeling it may be due to the location of the MLwiN.exe file, however I am having trouble locating this.

Many thanks in advance,

Posts: 1193
Joined: Mon Oct 19, 2009 10:34 am

Re: R2MLwiN - 'mlwin.exe' is not recognized

Post by ChrisCharlton »

Assuming that you are using a 64-bit version of Windows and have installed MLwiN in the default location then the correct setting for MLwiNPath would be:

Code: Select all

C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe

Post Reply