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!
svyset compatibility with runmlwin
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: svyset compatibility with runmlwin
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
-
- Posts: 1
- Joined: Mon Sep 23, 2024 1:42 am
Re: svyset compatibility with runmlwin
`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.
-
- Posts: 3
- Joined: Tue May 20, 2025 4:10 am
Re: svyset compatibility with runmlwin
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.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!