Problem Using Sampling Weights

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
SoumavaBasu
Posts: 7
Joined: Tue Jan 09, 2018 7:23 pm

Problem Using Sampling Weights

Post by SoumavaBasu »

Hello,
I am using the runmlwin command in STATA 13. the simple model I am trying out is working fine when no sampling weights are given.

. runmlwin x_out cons if gender~=. & pwt1~=., level2(group: cons) level1(ind:) discrete(distribution(binomial) link(logit) denominator(cons) pql2)
> maxiterations(30)

However, when I introduce weights, MLwiN stops working:

. runmlwin x_out cons if gender~=. & pwt1~=., level2(group: cons, weightvar(pwt2)) level1(ind:, weightvar(pwt1)) discrete(distribution(binomial) l
> ink(logit) denominator(cons) pql2) maxiterations(30)

Following error is shown in STATA:
The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button.

r(198);

Kindly let me know if I did anything wrong here.

Thanks,
Soumava
Last edited by SoumavaBasu on Tue Mar 13, 2018 5:17 pm, edited 1 time in total.
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem Using Sampling Weights

Post by ChrisCharlton »

There was a bug in MLwiN 3.01 where the missing indicator column wasn't recalculated after specifying weights, causing a potential crash. Could you try updating to version 3.02 (available from https://www.cmm.bristol.ac.uk/clients/softwaredownload/) to see whether that fixes it for you?
SoumavaBasu
Posts: 7
Joined: Tue Jan 09, 2018 7:23 pm

Re: Problem Using Sampling Weights

Post by SoumavaBasu »

Hi Chris,
This seems to have worked. Thank you so much.
Soumava
Post Reply