'invalid stoi argument' - pasting data into MLwiN

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
js222211
Posts: 2
Joined: Mon Feb 01, 2021 3:33 pm

'invalid stoi argument' - pasting data into MLwiN

Post by js222211 »

I get this message every time I click 'Paste' after copying and pasting my dataset from Excel into MLwiN. Can anyone explain why this is happening or how I can stop it? The data consists only of three columns, two categorical and two numerical with no missing values.

Many thanks.
ChrisCharlton
Posts: 1348
Joined: Mon Oct 19, 2009 10:34 am

Re: 'invalid stoi argument' - pasting data into MLwiN

Post by ChrisCharlton »

Are you pasting via the Edit->Paste menu, or the Paste button in the Names window?

Do you have column names in Excel, and if so what are they set to?

What are the possible category values that you data can take?
js222211
Posts: 2
Joined: Mon Feb 01, 2021 3:33 pm

Re: 'invalid stoi argument' - pasting data into MLwiN

Post by js222211 »

Hi Chris, thank you for your reply.

The issue appears to have been that it didn't like the categorical data, which was a handful of different country codes (e.g. FRA, GBR). I changed them to numbers and it worked, do you know why this is?
ChrisCharlton
Posts: 1348
Joined: Mon Oct 19, 2009 10:34 am

Re: 'invalid stoi argument' - pasting data into MLwiN

Post by ChrisCharlton »

It's hard to say the exact cause without seeing the data however from the error message it may be that it is interpreting some of the lines of data as MLwiN commands. If this was the case then it might be seeing the first column as the command with subsequent columns as command arguments and the falling over when these do not match the expected format. If re-ordering the columns makes a difference to whether it works for you then this would support the hypothesis.
Post Reply