Need help with using R2MLwiN

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
helenezyf
Posts: 3
Joined: Mon Sep 11, 2023 9:27 pm

Need help with using R2MLwiN

Post by helenezyf »

I'm new to R2MLwiN, and my laptop is MacOS in version 13.5.2. I downloaded the MLwiN 30-day free trial version and got the "MLwiN-30-day.msi" file. Then, I extracted all the files from this msi file, and I found that the only ".exe" file included is "w32_mlwin.exe". Then I run the following commands in R:

library(R2MLwiN)
options(MLwiN_path="/Users/Documents/MLwiN-30-day/w32_mlwin.exe")
data(tutorial)
model_1 <- runMLwiN(normexam ~ cons + standlrt + (1 | student), data = tutorial)

But I got the error message saying "Error in runMLwiN(normexam ~ cons + standlrt + (1 | student), data = tutorial) : /Users/Documents/MLwiN-30-day/w32_mlwin.exe is not executable"

Could someone who is familiar with this help me with it? Really appreciate it!
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Need help with using R2MLwiN

Post by ChrisCharlton »

Although we do provide a Mac-native scripting version of MLwiN with the full version of the software this is unfortunately not the case with the 30-day trial. In order to run this on a Mac you will either need to install it in a Windows virtual machine or via Wine (see https://www.bristol.ac.uk/cmm/software/ ... ysreq.html). The community version of Wine (see https://www.winehq.org/) does not currently have official support for MacOS over version 10.14 so if you wanted a supported platform you would need to look into Crossover (see https://www.codeweavers.com/crossover).
helenezyf
Posts: 3
Joined: Mon Sep 11, 2023 9:27 pm

Re: Need help with using R2MLwiN

Post by helenezyf »

Hi Chris! Thanks for the reply!

Do you mean that it's not possible to run R2MLwiN using the 30-day trial version of MLwiN at all? If that is the fact, then I can only purchase a full version of MLwiN? Since I want to run R2MLwiN in R and my MacOS is in version 13.5.2, I am not sure if I need to install it in a Windows virtual machine or via Wine or via other platform after purchasing the full version of MLwiN?

Could you please you help me with these questions? Really appreciate it!
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Need help with using R2MLwiN

Post by ChrisCharlton »

If you are running it on Windows then the trial version of MLwiN should work with R2MLwiN (except that for each model you will have to click the "accept trial" button). If you are running on a Mac or Linux machine then you will need to run the trial version under Wine so that it thinks it is running on Windows (after running the installer in Wine so that it has all the required files in the right places). Alternatively if you have Windows running in a virtual machine then you can install R and the MLwiN trial in there as this will look like a normal Windows machine to them.

If you own the full version of MLwiN (by either purchasing it or being a UK academic) then you can request a Mac native scripting version from https://www.cmm.bristol.ac.uk/clients/softwaredownload/. This will allow R2MLwiN to work fully without having to install any additional software, with the exception that you won't be able to examine the models in debug mode via the MLwiN GUI as we don't have a Mac version of this. If you wanted to use the full version of MLwiN through its graphical interface on a Mac then you would still need a virtual machine or Wine.

I hope that helps.
helenezyf
Posts: 3
Joined: Mon Sep 11, 2023 9:27 pm

Re: Need help with using R2MLwiN

Post by helenezyf »

This is very clear and helpful! Really appreciate it!
lolliesrinse
Posts: 1
Joined: Tue Jan 16, 2024 3:40 am

Re: Need help with using R2MLwiN

Post by lolliesrinse »

I'm trying to test some models and want to know the ICC / VPC.
amorapotter
Posts: 1
Joined: Fri Jan 19, 2024 7:05 am

Re: Need help with using R2MLwiN

Post by amorapotter »

helenezyf wrote: Mon Sep 11, 2023 9:36 pm I'm new to R2MLwiN, and my laptop is MacOS in version 13.5.2. I downloaded the MLwiN 30-day free trial version and got the "MLwiN-30-day.msi" file. Then, I extracted all the files from this msi file, and I found that the only ".exe" file included is "w32_mlwin.exe". Then I run the following commands in R:

library(R2MLwiN)mapquest
options(MLwiN_path="/Users/Documents/MLwiN-30-day/w32_mlwin.exe")
data(tutorial)
model_1 <- runMLwiN(normexam ~ cons + standlrt + (1 | student), data = tutorial)

But I got the error message saying "Error in runMLwiN(normexam ~ cons + standlrt + (1 | student), data = tutorial) : /Users/Documents/MLwiN-30-day/w32_mlwin.exe is not executable"

Could someone who is familiar with this help me with it? Really appreciate it!
Instead of relying on relative paths, consider using the full path to the executable file. You can find the full path by navigating to the directory in the terminal and using the pwd command.
Post Reply