Page 1 of 1

runmlwin error with mlogit model

Posted: Tue Jan 12, 2016 12:12 am
by juliettemalley
Hi
I am trying to run a fairly simple model that I am struggling to get to converge in STATA using the gsem programme. When I try and run it using runmlwin I get the error message "error while obeying batch file C:\....temp at line number 19: NAME c6 'resp' c7 'resp_indicator' Duplicate column name.
The model code is: runmlwin resp cons, ///
level2(cassr: cons, residuals(u)) ///
level1(id:) ///
discrete(dist(multinomial) link(mlogit) denom(cons) basecategory(1)) ///
nopause
I've tried looking at the solutions to similar posts but I can't find anything that helps. Can you help?
thanks

Re: runmlwin error with mlogit model

Posted: Tue Jan 12, 2016 12:26 pm
by juliettemalley
Hi
i think I have managed to solve this. I renamed my dep var respond rather than resp and it now works. Am guessing somewhere in your code for the programme you use 'resp' to describe an output.

Re: runmlwin error with mlogit model

Posted: Tue Jan 12, 2016 12:29 pm
by ChrisCharlton
Yes, this would make sense. When MLwiN expands the data to "long" format for multivariate and multinomial models it creates new variables named resp and resp_indicator to contain the combined responses and which of the original responses each row belonged to.