MVs & error message 'line too long'

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin 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 runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: MVs & error message 'line too long'

Post by ChrisCharlton »

I have a feeling that the size of the data set may be what is causing the problem. As part of the MNOM command, where is it getting stuck, MLwiN expands the data to approximately number of response categories times the size. This may in your case be larger than the currently set MLwiN worksheet size. To test whether this is the case you can try one or more of the following:

1) See if the model works with fewer variables (perhaps just cons)

2) Try fitting the model on a small sample of your data

3) Increase the default worksheet size in MLwiN. To do this open MLwiN and choose Options->Worksheet from the menu. Next choose a larger worksheet size (I would suggest starting with 100000) and click "use as defaults". Next time you use runmlwin it should be using this larger size.
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: MVs & error message 'line too long'

Post by ChrisCharlton »

I have now been able to replicate the error by reducing the size of my worksheet before running the example multinomial model, so it does indeed appear to be caused by the size of the data set. The incorrect error message should be fixed in the next release of MLwiN.
julia1633
Posts: 30
Joined: Mon Aug 15, 2011 1:54 pm

Re: MVs & error message 'line too long'

Post by julia1633 »

Dear Chris,

Thanks for your advice. Yes, I think the size of the dataset was a problem. I've reset the size of the worksheet and the msg 'line too long' no longer appears. I've started running the model just now. One thing that bothers me at this stage is that I got the message "Unexpanded level 2 id (setid) must not contain consecutive repeated codes in multinomial model" which I resolved by creating a unique identifier for each observation. However, 'setid' is level 1 identifier not level 2 as it appear in the message. I wonder whether my syntax is correct and if so why MLwiN refers to setid (which are individuals) as level 2 not level 1. IN my model level 2 is years; and level 3 - countries. Please see below

runmlwin SUYR5JOBml2 cons age age_sq male gemwork educ_secpost educ_post busang_dum omestb_dum knowent_dum fearfail_dum l3r_hfgov l3_exconst l3_finfree l_dgdp l_gdp_pc_ppp, level3(country: cons) level2(year: cons) level1(obsno) discrete(distribution(multinomial) link(mlogit) denom(cons) base(1))

Many thanks,
Julia
julia1633
Posts: 30
Joined: Mon Aug 15, 2011 1:54 pm

Re: MVs & error message 'line too long'

Post by julia1633 »

Dear Chris,

I think I've just found an answer to my previous question. Is it becase in MLwiN response categories form level 1 and so individuals (setid) are level 2 and so forth? Many thanks for all your help so far - your advice was extremely useful. I am just wondering is there any way to get significance levels or to increase rounding of the coefficients and se to 5-6 decimal points as it is hard to interpret the results when both coefficients and se are equal to 0.000. One more thing. Is there any way to get a more detailed output (say the No of observations; diagnostics etc.).

Many thanks ,
Julia
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: MVs & error message 'line too long'

Post by GeorgeLeckie »

Hi Julia,

Yes you are correct. All the levels get shunted up one when the model is fitted in MLwiN. The new level 1 is simply used to define the structure of your response. From memory, your response variable has four categories. You will therefore have three rows within each individual, one for each of the three log-odds contrasts of the model.

MLwiN does not provide significance levels for the model parameters.

You can increase the display precision in MLwiN from 3 to say 5 or 6 decimal places by going to the Options Menu and then the Numbers Window.

However, recommend that you simply allow runmlwin to return the model results to Stata. These results will then be presented with sufficient decimal places and p-values will be provided for each parameter. The runmlwin output also gives the number of units at each level in your model hierarchy.

Best wishes

George
julia1633
Posts: 30
Joined: Mon Aug 15, 2011 1:54 pm

Re: MVs & error message 'line too long'

Post by julia1633 »

Dear George,

Many thanks for your response and useful information. I am sorry for asking, perhaps, a stupid question. Does runmlwin return the model results to STATA automatically or do I have to use a specific command for this?

Kind Regards,
Julia
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: MVs & error message 'line too long'

Post by GeorgeLeckie »

Hi Julia,

Just click the Resume Macro button in MLwiN twice to return the model results to Stata.

Once you are happy with a model and no longer need to check it in MLwiN, simply add the nopause option to the runmlwin command.

This is explained in the help file, but I appreciate that the help file is quite long and so this is hard to find. It is well worth printing off a copy of the help file as well as reading through the relevant chapters of the MLwiN manual and the do-files we have provided for replicating all results presented in that manual.

Best wishes

George
julia1633
Posts: 30
Joined: Mon Aug 15, 2011 1:54 pm

Re: MVs & error message 'line too long'

Post by julia1633 »

Dear George,

Many thanks for your reply and apologies for bothering you with such a simple question. In fact, I've read both runmlwin help and ch10 of MLwin manual on multinomial modeling, but it looks like this bit has somehow skipped my attention. Thanks once again.

Kind Regards,
Julia
Post Reply