Issue when importing repeated measure data

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software 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!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
tomcolas
Posts: 5
Joined: Fri Oct 10, 2025 12:34 pm

Issue when importing repeated measure data

Post by tomcolas »

Hello,

I am new to MLwiN, and I have been struggling to import data from an Excel file (my data file is attached).
DonneesML.xls
issue when importing repeated measure data - excel file
(139.5 KiB) Downloaded 23 times
Importing the data using the Edit/Paste Data option seems to work; however, when inspecting my data, only the "subject" and "stimuli" columns seem to have correct values. All the other columns appear completely wrong. In the "Names" window, the mean, max, and min are completely different from what I expect. For example, the "annoyance" column shows a mean of 144 when it should be around 4.

After some digging, it seems that the software interprets the values from these columns as categories and automatically assigns somewhat random values to these categories. For example, in the "annoyance" column, the first cell, which should have a value of 1.94, is given the value 1; the second cell is given the value 2, and so on (with some cells containing values very close to previous ones being assigned the same categorical value).
Even after using the Toggle Categorical option in the Names window, these variables retain the wrong values.
All I want is the original values from my Excel file to be retained.

I have tried other ways to import the data, but nothing seems to work, and I’m stuck unable to use my data.
If anyone has any advice, that would be great!
I hope this message is clear enough.

Looking forward to your answers.
Take care,
Tom
ChrisCharlton
Posts: 1390
Joined: Mon Oct 19, 2009 10:34 am

Re: Issue when importing repeated measure data

Post by ChrisCharlton »

Can you confirm which version of MLwiN you are using? I just tested this and it loaded correctly for me. Are you able to say which other ways you have used to try importing the data? The File>Import... menu should allow you to load a variety of text based formats.
tomcolas
Posts: 5
Joined: Fri Oct 10, 2025 12:34 pm

Re: Issue when importing repeated measure data

Post by tomcolas »

Hello.
Thank you for your answer. I'm using version 3.15.
I tried to import the data using the File>import option and selecting a txt file. I tried using the File>ASCII text file imput and the issue was the same.
I actually noticed that the data were correctly imported when i used only whole numbers (without decimals). It seems to me that the decimal point make the software read the cells as character chains insteed of numbers. However i tried formating my data in different ways in Excel (forcing the cells in 'numerical').
I actually found a 'solution' which is to multiply my all table by (for exemple) 10000, removing any remaining decimals, importing the data in MLwiN, and dividing by the same factor directly in MLwiN to get my original values.
It's not very convenient but at least I can use my data. even if it would still be better to be able to import them proprely.
ChrisCharlton
Posts: 1390
Joined: Mon Oct 19, 2009 10:34 am

Re: Issue when importing repeated measure data

Post by ChrisCharlton »

Do you by any chance have the decimal separator set to the European convention of ,? If so it may be that there is a mismatch with the separator generated by Excel and what MLwiN is expecting. You could check that this is the case by temporarily changing it to . and seeing whether it has more success when importing.
tomcolas
Posts: 5
Joined: Fri Oct 10, 2025 12:34 pm

Re: Issue when importing repeated measure data

Post by tomcolas »

I had already checked that, no matter which decimal separator I use, the issue remains the same.
ChrisCharlton
Posts: 1390
Joined: Mon Oct 19, 2009 10:34 am

Re: Issue when importing repeated measure data

Post by ChrisCharlton »

Thanks for the confirmation. If you can let me know what regional settings you have I can attempt to replicate the problem.
tomcolas
Posts: 5
Joined: Fri Oct 10, 2025 12:34 pm

Re: Issue when importing repeated measure data

Post by tomcolas »

The regional setting of my computer (windows 11) is 'France'
ChrisCharlton
Posts: 1390
Joined: Mon Oct 19, 2009 10:34 am

Re: Issue when importing repeated measure data

Post by ChrisCharlton »

Thank you for this information, I believe that I have now been able to replicate the behaviour.

When processing the data to paste it the software replaces occurrences of , with . which is behaviour left over from older versions of MLwiN that did not take regional settings into account. When it is later processed by a routine that does expect numbers to match the setting the . has no special meaning, resulting in the value being interpreted as text rather than than a number, which is what you were seeing. Until this is fixed in the next version of the software you can work around the problem by temporarily setting the regional settings to specify . as the decimal separator.
tomcolas
Posts: 5
Joined: Fri Oct 10, 2025 12:34 pm

Re: Issue when importing repeated measure data

Post by tomcolas »

Alright. Thanks a lot for your time and help !

Take care
Post Reply