Page 1 of 1

Error message regarding level 1 ID variable - Obsno is held

Posted: Sun Oct 23, 2011 10:16 am
by julia1633
Dear George,

After upgrading my MLwin 2.23 version using the following command
adoupdate runmlwin, update
I keep getting the following error message
Obsno is held to more precision than MLwiN can handle, it must be recoded so that values lie in the range +/- 16,777,215.
In my case obsno varies from 1 to 471704, so I don’t understand why I keep getting this message, esp. given that I didn't have the same problem prior upgrading.

Many thanks,
Julia

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Sun Oct 23, 2011 9:43 pm
by ChrisCharlton
This appears to be a bug, and will be fixed in the next released version of runmlwin. In the mean time you can work around it by running the following in Stata prior to calling runmlwin:

Code: Select all

recast float obsno
Alternatively if you are comfortable editing the runmlwin.ado file you can change the lines:

Code: Select all

		if "`:type `var''" == "long" {
			capture recast float `var'
			if !_rc {
				display as error "`var' is held to more precision than MLwiN can handle, it must be recoded so that values lie in the range +/- 16,777,215"
				exit 198
			}
		}
to:

Code: Select all

		if "`:type `var''" == "long" {
			capture recast float `var'
			if `r(N)' > 0 {
				display as error "`var' is held to more precision than MLwiN can handle, it must be recoded so that values lie in the range +/- 16,777,215"
				exit 198
			}
		}

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Mon Oct 24, 2011 9:53 am
by julia1633
Dear Chris,

Thanks a lot for prompt reply.

Julia

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Thu Oct 27, 2011 1:53 pm
by julia1633
Dear Chris,

Following your advice I've overcome the problem with the original error message regaring my level 1 ID variable, but I seem to encounter another problem. After getting provisional estimates for MQl1 and resuming macro MLwin produces another message saying that MLwin stopped working and must be shut down. Is there any way to overcome this?

My other question concerns MLwin version (2.23) installed on my laptop. I didn't upgrade it with its latest version on a laptop and it seemed to be running well. However, I've noticed recently that once I wish to replicate earlier results I fail to do this om some occasions. I get stuck while I am trying to estimate MQL1 to get initial values for MCMC. I get Q# appearing instead of valid estimates that I obtained esrlier. Can this also be possibly attributed to a bug?

Thanks,
Julia

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Thu Oct 27, 2011 3:23 pm
by ChrisCharlton
Would it be possible to email me the syntax and data so that I can attempt to replicate this and determine whether the problem is in runmlwin or MLwiN?

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Mon Nov 14, 2011 3:34 pm
by julia1633
Dear Chris,

Apologies for not getting back to you earlier. I wanted to check all my earlier to specifications to see if I can replicate earlier results and it took quite a lot of my time given the size of the dataset and the computational time it requires to run a 3-level model using mcmc. Apparently, it looks that I can replicate the earlier results. The earlier problem with failing to replicate all my mcmc results arose from that I used different initial values based on different mql1 specs to fit the mcmc. For example, I estimated first mql1 where I had GDP pc as a level variable. Then I used estimates from this model to fit the the model using mcmc. Then I carried with mcmc replacing GDP pc with quartile dummies but using the same initial values from mql1. In fact, I discovered that the results of mcmc differ a lot (to the extent that some variables change their significance level a lot) depending on what initial values one may use. My question is how this may happen. Is it something that I should be concerned about? Is it a bug? Please let me know if this requires any further investigation and you still prefer me to send you a dataset and syntax (or a log file which shows the variation in the results with the use of different initial values).

Kind Regards,
Julia

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Mon Nov 14, 2011 4:18 pm
by GeorgeLeckie
Dear Julia,

Three general pieces of advice regarding MCMC and initial values:

(1) Always try to specify reasonable initial values. Using mq1 estimates for exactly the same model specification is a good way to do this.

(2) The longer the burnin the less sensitive your MCMC parameter estimates will be to the initial values.

(3) It is good practice to always check the sensitivity of your results to different sets of starting values.

The MLwiN MCMC manual gives lots of good and thorough advice of these issues and I would recommend reading it carefully even if you only intend to use MLwiN via runmlwin.

Best wishes

George

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Mon Nov 14, 2011 4:33 pm
by ChrisCharlton
I would just add that you may find the mcmcsum command that accompanies runmlwin useful for performing diagnostics on your MCMC runs.

Re: Error message regarding level 1 ID variable - Obsno is h

Posted: Wed Nov 23, 2011 11:33 am
by julia1633
Dear both,

Thanks for your advice.

Kind Regards,
Julia