using runmlwin with survey 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
becciaa1992
Posts: 21
Joined: Thu Oct 17, 2019 12:21 am

using runmlwin with survey weights

Post by becciaa1992 »

Hello,

I am trying to fit a two-level multilevel logistic model in runmlwin using survey weights. The model runs fine using PQL2 estimation methods, however, I get the following error when trying to run the same model using MCMC methods: "Weights are only valid for univariate models estimated using (R)IGLS"

Here is the code I am using:

Code: Select all

* Fit model using PQL2
runmlwin outcome cons , /// 
  level2(group: cons) ///
  level1(id:, weightvar(weight)) ///
  discrete(distribution(binomial) link(logit) denominator(denominator) pql2) ///
  rigls maxiterations(100) ///
  nopause
  
* Fit model using MCMC
runmlwin outcome cons , ///
  level2(group: cons, residuals(u, savechains("u.dta", replace))) /// 
  level1(id:, weightvar(weight)) ///
  discrete(distribution(binomial) link(logit) denominator(denominator)) ///
  mcmc(burnin(5000) chain(50000) thinning(50) ///
    savechains("beta.dta", replace)) initsprevious /// 
  nopause 
I do have the most recent version of runmlwin. Any help would be appreciated, thank you!
ChrisCharlton
Posts: 1248
Joined: Mon Oct 19, 2009 10:34 am

Re: using runmlwin with survey weights

Post by ChrisCharlton »

Unfortunately weighting is not currently implemented for MCMC within MLwiN, so you will be unable to fit this here. See http://www.bristol.ac.uk/cmm/software/s ... ights.html for more details on using weights with MLwiN.
ManuelDewez
Posts: 16
Joined: Tue Mar 09, 2021 5:54 pm

Re: using runmlwin with survey weights

Post by ManuelDewez »

Hello Chris,

I know that the post is from September 2020, but has there been any change on this topic, is weighting possible with MCMC in MLwin?

Thank you

Manuel
ChrisCharlton
Posts: 1248
Joined: Mon Oct 19, 2009 10:34 am

Re: using runmlwin with survey weights

Post by ChrisCharlton »

Sorry, there is no change here, and this is not currently in our in our future plans.
Post Reply