Page 1 of 1

smatrix error in single-level logistic model

Posted: Wed Oct 21, 2015 6:09 am
by markhanly
Hi guys,

I have three-level data with children (~150,000) nested within schools (~5000) and areas (~200). I've fitted various logistic multilevel models without any issues; where I'm running into problems is when I try to fit a single-level logistic model. I would like to include this as a baseline for more complex models, and although I could just simply run it in Stata it would be easier and preferable to be consistent using runmlwin.

The error I am getting is 'overflow when allocating smatrix'. From reading other posts on this forum this seems to be related to dataset size, and indeed if I take a random 10% of the data everything runs smoothly.

- I have experimented with the size() option in mlwinsettings() with no success.
- I have seen the option 'optimat' mentioned as a solution to this error message but that option doesn't seem to be available in my version of runmlwin (i.e. if I include that option I get an error message/it is not listed in the helpfile if I type 'help runmlwin').
- I am using Stata 12 and MLwiN 2.30
- I have typed adoupdate runmlwin to make sure I have the most up-to-date version of the command.

The code below replicates the error:

Code: Select all

clear
set obs 150000
gen id=_n
gen cons=1
gen girl = rbinomial(1,.5)
gen pass = rbinomial(1,invlogit(.6+.2*girl))

runmlwin pass cons girl, level1(id:) ///
discrete(distribution(binomial) link(logit) denom(cons)) nopause
If I reduce the number of records to 15000 everything runs fine.
Adding mlwinsettings(optimat) returns the error 'option optimat not allowed'.

Thanks in advance for any pointers!

Cheers,
Mark

Re: smatrix error in single-level logistic model

Posted: Wed Oct 21, 2015 8:58 am
by ChrisCharlton
I'm not sure why it isn't offering you that option - perhaps it's picking up an older version of the command? Could you run the following command:

Code: Select all

which runmlwin
This should give you the location of where the command is installed, as well as the release date.

It might be worth uninstalling and reinstalling it in case the update is being prevented for some reason (after uninstalling try running the command to check whether there is more than one installed version).

Re: smatrix error in single-level logistic model

Posted: Wed Oct 21, 2015 11:04 pm
by markhanly
Hi Chris,

Thanks for that. The release date for my version is 01 Sep 2012. I'm guessing this isn't the most recent update?

I'm running Stata and MLwiN within a secure environment, i.e. no internet access. When I install user-written commands these come from a local copy which are supposedly updated on a weekly basis. It looks like that is not the case here. I'll follow up with admin here and hopefully optimat in the most recent version will solve my problem.

Cheers,
Mark

Re: smatrix error in single-level logistic model

Posted: Thu Oct 22, 2015 8:48 am
by ChrisCharlton
Looking at https://ideas.repec.org/c/boc/bocode/s457335.html the last released version is dated 31 July 2013, so you are using an older version which would explain why you are missing the optimat setting.

Re: smatrix error in single-level logistic model

Posted: Thu Nov 19, 2015 4:30 am
by markhanly
Just to confirm that the optimat option did indeed solve this issue, once I was able to install it. Cheers for your help.