Error in non-proportional odds model

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/
Post Reply
DanielWeller
Posts: 1
Joined: Mon Sep 28, 2015 10:22 am

Error in non-proportional odds model

Post by DanielWeller »

Dear members,
I am trying to fit two two-level ordinal logistic models, a proportional odds model and a non-proportional odds model, but have encountered an error message while running my syntax for non-proportional odds model. The error states 'error: design vector at level 2 is the wrong length (moni)'. As I'm fairly new to runmlwin and Stata, I wasn't able to figure out what is wrong with my code and how to fix it.

proportional odds model

Code: Select all

gen cons=1
drop if missing(hh_id, person_id, cons, k2a, i4a, fl1b, fl2a, fl3b, k1a, wb, city_age, dist_train, dist_airport)
recast float fl3b city_age, dist_train, dist_airport, force
***** Proportional Odds
sort hh_id person_id
capture noisily xi: runmlwin k2a cons (i.i4a fl1b i.fl2a fl3b i.k1a i.wb city_age dist_train dist_airport, contrast(1/3)), ///
level2(hh_id: (cons, contrast(1/3))) ///
level1(person_id:) ///
discrete(dist(multinomial) link(ologit) denom(cons) basecategory(4)) ///
nopause tolerance(10) maxiterations(250)
***** Non-Proportional Odds
sort hh_id person_id
capture noisily xi: runmlwin k2a i.i4a fl1b i.fl2a fl3b i.k1a i.wb city_age dist_train dist_airport cons, ///
level2(hh_id: cons) ///
level1(person_id:) ///
discrete(dist(multinomial) link(ologit) denom(cons) basecategory(4)) ///
nopause tolerance(10) maxiterations(250)
Is anyone familiair with this message and able to explain to me what it means or provide some insides on how to fix this problem?

Thank you,
Dan
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Error in non-proportional odds model

Post by ChrisCharlton »

It may be that the software is struggling to estimate the model. I would suggest simplifying it (maybe so that it just has cons) and testing whether that works. If so then try building up the model, using the results of each simpler model as the initial values for the next. It can also sometimes be helpful to remove the nopause option and examine the model/data while in MLwiN as this can offer clues as to the cause of the problem.
Post Reply