Issue with factor variables

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
leap
Posts: 12
Joined: Mon Jul 11, 2011 11:29 am

Issue with factor variables

Post by leap »

Dear all,

I included some factor variables in my regression and I keep on receiving an error message.

The regression code is the following (simplified version of my actual regression):

Code: Select all

runmlwin x011 cons c.gtrust_rdev##c.educ_nat , ///
	level3(s003: cons) level2(x048: cons) level1(id:) ///
	discrete(distribution(poisson) pql2) nopause
The error message is the following:

__000003 is held to more precision than MLwiN can handle, to reduce the precision use recast float __000003, force
r(198);

I have tried to recast the variable:

Code: Select all

recast float __000003, force
but I obviously get the following error message

variable __000003 not found


When I construct the interaction and run the regression, I don't encounter any problems.

Code: Select all

gen gtrustdev_educ = gtrust_rdev*educ_nat

runmlwin x011 cons gtrust_rdev educ_nat gtrustdev_educ, ///
	level3(s003: cons) level2(x048: cons) level1(id:) ///
	discrete(distribution(poisson) pql2) nopause
I would like to use the margins commands after my regression, which is why I would like to use factor variables.

Thank you for your help.
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Issue with factor variables

Post by ChrisCharlton »

Thanks for letting us know about this. You cannot recast __000003 because it is a temporary variable that is only created for the duration that runmlwin is running. We have now added code to ensure that these generated variables are kept to the correct precision for MLwiN in our development version, so this should be fixed in the next release.
leap
Posts: 12
Joined: Mon Jul 11, 2011 11:29 am

Re: Issue with factor variables

Post by leap »

Thank you for the prompt answer.
I will be looking forward to the new release!
Post Reply