error in multiple membership models

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
morning03
Posts: 12
Joined: Thu Jul 05, 2012 7:17 am

error in multiple membership models

Post by morning03 »

Hi.

I am estimating a multiple-membership multinomial model (3 categories for the response outcome) using a data with 23712 person-year records. If a person is in cohabiting relationship, I am implicitly assuming that his / her random effect is a weighted function of each partner's random effect. However, I keep on getting an error message that reads, "The 23713th MM unit for obs 1 is absent but has positive weight." I have already double-checked the data and all MM units are present. In addition, I also find the error message weird considering that I am working on a data with only 23712 person=year records.

Moreover, I have successfully estimated a multiple-membership logistic model using the same data, without any problem.

I am attaching a screenshot of the mlwin data viewer for reference.

Thanks a lot.


sort pid wave_obs
capture noisily runmlwin Yhousetenure3_b Xsingle Xcouple ${x_all} if units_included_foranalysis == 1 & subsampled == 1, level2(pid: cons, mmids(pid pid_mem2) mmweights(weight_mem1 weight_mem2)) ///
level1(wave_obs:) mcmc(burnin(1000) chain(20000)) initsprevious discrete(distribution(multinomial) link(mlogit) denominator(cons) basecategory(0)) nopause mlwinpath(C:\Program Files\MLwiN v2.25\mlwin.exe)
Attachments
error_mm.jpg
error_mm.jpg (626.9 KiB) Viewed 5829 times
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: error in multiple membership models

Post by GeorgeLeckie »

Hello,

We have some ideas what this might be, but it would help to see the data

Please send the Stata dataset and do-file to replicate the MLwiN error message

It would help if you made the runmlwin models as simple as possible while still leading to the same error message. So please remove, for example, the fixed effects from the data and do-file etc.

Best wishes

George
morning03
Posts: 12
Joined: Thu Jul 05, 2012 7:17 am

Re: error in multiple membership models

Post by morning03 »

Thank you very much, George.

I tried attaching the data in Stata format but it didn't work so I am attaching the data in excel format.

Have a great weekend ahead.


sort pid wave_obs
capture noisily runmlwin yhousetenure3_b cons, level2(pid: cons, residuals(u1a)) level1(wave_obs:) discrete(distribution(multinomial) link(mlogit) ///
denominator(cons) basecategory(0) mql1) nopause maxiterations(100) mlwinpath(C:\Program Files\MLwiN v2.25\mlwin.exe)


sort pid wave_obs
capture noisily runmlwin yhousetenure3_b cons, level2(pid: cons, mmids(pid pid_mem2) mmweights(weight_mem1 weight_mem2) residuals(u1b)) ///
level1(wave_obs:) mcmc(burnin(1000) chain(20000)) initsprevious discrete(distribution(multinomial) link(mlogit) denominator(cons) basecategory(0)) nopause mlwinpath(C:\Program Files\MLwiN v2.25\mlwin.exe)
Attachments
subset_data.xlsx
(812.64 KiB) Downloaded 526 times
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: error in multiple membership models

Post by GeorgeLeckie »

Hi,

We have now taken a look at this problem.

I'm afraid, there is no easy way to currently fit multiple membership multinomial response models in MLwiN.

Likewise there is no easy way to currently fit multiple membership ordinal or multivariate response models in MLwiN.

As these models cannot be easily fit in MLwiN, it is also not possible to fit them via runmlwin.

We will add error messages to this effect in the next release versions of MLwiN and runmlwin

Sorry not to be of more help.

Longer term we will look into allowing these models in MLwiN (and therefore runmlwin).

Common to all three types of model is that MLwiN carries out a data expansion. The problem is that the MM IDs and Weight variables are not expanded. From within the MLwiN GUI it should be possible to manually alter the columns after the data expansion to manually get MLwiN to fit these models, but we have yet to test this.

George
morning03
Posts: 12
Joined: Thu Jul 05, 2012 7:17 am

Re: error in multiple membership models

Post by morning03 »

Thank you very much for the time and info, George.
Post Reply