runmlwin error

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/
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Hi Chris
Manay thanks for your suggestions, it seems that runmlwin work properly. Yet, using - mi est- command, I have problem as follow. Would you please help me with that?

Best Wishes

mi est,saving(miest)cmdok: runmlwin V_outcome5 V_SEXID2 i.V_LICENCETYPEID3 i.ENSANI3 cons, level2( TheKey:cons) level1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3)) nopause
(26100 values of imputed variable V_outcome5 in m>0 updated to match values in m=0)
i: operator invalid
an error occurred when mi estimate executed runmlwin on m=1
no results will be saved
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Dear Chris
I also tried the below syntax; mi est,saving(miest)cmdok: runmlwin V_outcome5 V_JOBTYPEID3 cons, level2( TheKey
> :cons) level1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecate
> gory(3)) nopause

but in MLwin software I got an error"can not allocate smatrix(fs).

What does that mean?
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

I would suggest that you first try your new models without the mi: prefix so you can determine whether the problem is with -mi- or -runmlwin-.

Assuming that you are using a recent version of Stata that supports it I can't see a reason why it doesn't like the i. syntax, however as an alternative you could add the xi: prefix to your -runmlwin- call, i.e.

Code: Select all

mi est, saving(miest) cmdok: xi: runmlwin V_outcome5 V_SEXID2 i.V_LICENCETYPEID3 i.ENSANI3 cons, level2( TheKey:cons) level1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3)) nopause
The error message can not allocate smatrix(fs) will often indicate that some of your higher level units are larger than MLwiN's default memory allocation can handle. You may be able to solve this by adding the optimat option to the end of your -runmlwin- call. Otherwise you may have to use a subset of your data and/or switch your MLwiN_path to the 64-bit scripting version of MLWiN.
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

OK
Dear Chris
I tried the model without mi prefix, drop individuals with missing values out of data and use the optimate option. Again I got error message "option optimate not allowed".

xi:runmlwin V_outcome5 V_SEXID2 i.V_LICENCETYPEID3 cons, level2( TheKey:cons) le
> vel1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3))
> nopause optimate
i.V_LICENCETY~3 _IV_LICENCE_0-4 (naturally coded; _IV_LICENCE_0 omitted)

option optimate not allowed

Regards
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

You have a slight typo in your command syntax. It should be optimat not optimate.
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Yes,
But there is no difference in outputs;

xi:runmlwin V_outcome5 V_SEXID2 i.V_LICENCETYPEID3 cons, level2( TheKey:cons) le
> vel1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3))
> optimat
i.V_LICENCETY~3 _IV_LICENCE_0-4 (naturally coded; _IV_LICENCE_0 omitted)

option optimat not allowed


xi:runmlwin V_outcome5 V_SEXID2 cons, level1(V_id:) discrete(dist(multinomial)
> link(ologit) denom(cons) basecategory(3)) nopause optimat

option optimat not allowed
r(198);
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

Sorry - I slightly mis-remembered the syntax. It should be a sub-option under mlwinsettings, so the correct command would be:

Code: Select all

xi: runmlwin V_outcome5 V_SEXID2 i.V_LICENCETYPEID3 cons, level2( TheKey:cons) level1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3)) mlwinsettings(optimat) nopause
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Hi Dear Chria
Many thanks for your kindly suggestions. It seems to works wihout problem.

Thank you again for your helps

Best Regards
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

ali482002 wrote:Hi Dear George

I did what you asked me;

tabulate V_outcome5,miss

Code: Select all

 V_outcome5 |      Freq.     Percent        Cum.
------------+-----------------------------------
  No injury |     19,067       91.51       91.51
    Injured  |      1,610         7.73       99.23
       Dead  |        142          0.68       99.91
          .     |          18          0.09      100.00
-----------------------------------------------
      Total |     20,837      100.00
. runmlwin V_outcome5 cons, level1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategor
> y(3)) nopause

type mismatch
r(109);
Post Reply