smatrix error in single-level logistic model
Posted: Wed Oct 21, 2015 6:09 am
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:
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
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
Adding mlwinsettings(optimat) returns the error 'option optimat not allowed'.
Thanks in advance for any pointers!
Cheers,
Mark