I'm trying to fit a multilevel logistic regression model using the runmlwin package in Stata, and I'm encountering some issues with the estimated random effects. The model is taking a long time to converge, and I'm seeing some random effect variances that are very close to zero.
I know that in the MLwiN software directly, there is an option to set a minimum value for the random effect variances using the MISR command. Is there a similar setting or option available when running the model through runmlwin? I want to make sure I'm specifying appropriate constraints on the random effects to ensure the model converges properly and provides reliable estimates.
How to fit a regression model
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: How to fit a regression model
The MISR command is used in conjunction with post-estimation calculation of the residuals and are not normally used in model estimation except with PQL1 or PQL2, or in MCMC where they are used for starting values. The runmlwin equivalent of this setting for post-estimation residuals is the norecode option within residuals(). This is always turned on when calculating the starting residuals for MCMC and there is not currently a way to set this for the residuals calculated within PQL1/PQL2.
If you want to exclude a random parameter (i.e. force it to zero) you can do with with the elements() option. You can find an example of this in the replication script for chapter 7 of the MLwiN user guide.
If you want to constrain parameters to take a particular value, or to be equal to each other you can do with via the standard Stata constraint command, in combination with the constraints() runmlwin option. You can find an example of the in the replication script for chapter 18 of the MLwiN user guide.
If you want to exclude a random parameter (i.e. force it to zero) you can do with with the elements() option. You can find an example of this in the replication script for chapter 7 of the MLwiN user guide.
If you want to constrain parameters to take a particular value, or to be equal to each other you can do with via the standard Stata constraint command, in combination with the constraints() runmlwin option. You can find an example of the in the replication script for chapter 18 of the MLwiN user guide.
-
- Posts: 2
- Joined: Wed Aug 07, 2024 9:00 am
Re: How to fit a regression model
Thanks so much.ChrisCharlton wrote: Wed Aug 07, 2024 12:55 pm The MISR command is used in conjunction with post-estimation calculation of the residuals and are not normally used in model estimation except with PQL1 or PQL2, or in MCMC where they are used for starting values. The runmlwin equivalent of this setting for post-estimation residuals is the norecode option within residuals(). This is always turned on when calculating the starting residuals for MCMC and there is not currently a way to set this for the residuals calculated within PQL1/PQL2.
If you want to exclude a random parameter (i.e. force it to zero) you can do with with the elements() option. You can find an example of this in the replication script for chapter 7tunnel rush of the MLwiN user guide.
If you want to constrain parameters to take a particular value, or to be equal to each other you can do with via the standard Stata constraint command, in combination with the constraints() runmlwin option. You can find an example of the in the replication script for chapter 18 of the MLwiN user guide.