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)
Thank you,
Dan