svyset compatibility with runmlwin

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
ja175441
Posts: 1
Joined: Wed Feb 23, 2022 3:15 pm

svyset compatibility with runmlwin

Post by ja175441 »

Hi there,
I am using data from the Millenium Cohort Study (MCS) to run some trajectory models through runmlwin. The MCS provide stata code to adjust for the clustering and sample design:
svyset sptn00 [pweight=""], strata(pttype2) fpc(nh2)
However, this doesn't seem compatible with runmlwin (Error message: runmlwin is not supported by svy with vce(linearized))

Do you have any suggestions for incorporating these adjustments into my model through runmlwin or is my best bet to use a different package? (like meglm)

Thank you in advance!
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: svyset compatibility with runmlwin

Post by ChrisCharlton »

I asked George about this and he suggested that the weighting options in MLwiN might do what you want. Unfortunately we don't provide much documentation for this, but you can see how to specify them by looking at the options in the runmlwin help file, i.e.

Code: Select all

help runmlwin
wsyendurable
Posts: 1
Joined: Mon Sep 23, 2024 1:42 am

Re: svyset compatibility with runmlwin

Post by wsyendurable »

`runmlwin` doesn’t support `svyset`. To adjust for clustering and weights, use `runmlwin`'s multilevel structure and apply weights manually with the `weight()` option. Alternatively, switch to `meglm`, which supports survey design adjustments directly.
Nothome1975
Posts: 3
Joined: Tue May 20, 2025 4:10 am

Re: svyset compatibility with runmlwin

Post by Nothome1975 »

ja175441 wrote: Mon Jul 18, 2022 3:38 pm Hi there,
I am using data from the Millenium Cohort Study (MCS) to run some trajectory models through runmlwin. The MCS provide stata code to adjust for the clustering and sample design:
svyset sptn00 [pweight=""], strata(pttype2) fpc(nh2)(solar smash)
However, this doesn't seem compatible with runmlwin (Error message: runmlwin is not supported by svy with vce(linearized))

Do you have any suggestions for incorporating these adjustments into my model through runmlwin or is my best bet to use a different package? (like meglm)

Thank you in advance!
You're right—runmlwin isn't compatible with svy settings. One option is to manually adjust for clustering using random effects at the PSU level. If accounting fully for complex survey design is essential, switching to meglm or another package like gsem might be more appropriate.
Post Reply