may not label .1666666716 error message

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
mlwinnewbie
Posts: 12
Joined: Tue Apr 29, 2014 12:41 pm

may not label .1666666716 error message

Post by mlwinnewbie »

Hi listers,

I am having problems running the runmlwin command for an mlogit regression. My DV (satisfaction) has 3 levels (yes, partly and no) and my IV also has 3 levels which code the kind of goal selected by the respondent (treatment, social or financial). I am interested to see if the type of goal selected influences satisfaction. The data was collected at 7 time points (i.e., wave) across approx. 500 people (IDD).

I wrote the script in this way

global MLwiN_path "C:\Program Files (x86)\MLwiN v2.29\i386\mlwin.exe"
sort IDD wave
gen cons=1

set matsize 800 /*I had to increase this following an error message*/

runmlwin sat_meanw topic3g_w cons, ///
level2(IDD: cons) ///
level1(wave:) ///
discrete(distribution(multinomial) ///
link(mlogit) ///
denominator(cons) ///
basecategory(2)) ///
nopause

BUT when I run it I receive the "may not label .1666666716" error message. I am not sure what this means.

I simplified the model to have as level 1 'wave' and subsequently IDD to see if the issue was related to either level and I received the message in both cases. None of the categorical variables has a value of .167 so I am not sure what is going on. I am hoping you can help!

Cheers,
Fran
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: may not label .1666666716 error message

Post by ChrisCharlton »

Could you run the code:

Code: Select all

set trace on
before fitting your model and then provide us with a listing of the lines prior to the error message, and we will try to track down what is going on?
mlwinnewbie
Posts: 12
Joined: Tue Apr 29, 2014 12:41 pm

Re: may not label .1666666716 error message

Post by mlwinnewbie »

Hi thanks for your reply.

Below are some of the lines prior to the error message - I could not upload the log unfortunately. Let me know if you need to see more of the code.


---------------------------------------------------------------------------------------------------- begin label ---
- version 10.0
- gettoken val : 0
- if (strpos("`val'", "val") > 0 ) {
= if (strpos("define", "val") > 0 ) {
gettoken val 0 : 0
syntax anything [, nofix]
if "`fix'" != "" {
local fix ", nofix"
}
gettoken var rest : anything
while `"`rest'"' != "" {
gettoken lab rest : rest
local label "`lab'"
}
local vlist : list anything - lab
if "`lab'" == "." {
local lab ""
}
foreach var of varlist `vlist' {
_label `val' `var' `lab' `fix'
}
}
- else {
- _label `macval(0)'
= _label define __00001A 0 "0", add
- }
------------------------------------------------------------------------------------------------------ end label ---
- }
- label define `newvaluelabel' `r' "`: label (`response1') `r''", add
= label define __00001A .1666666716337204 ".1666666716337204", add
---------------------------------------------------------------------------------------------------- begin label ---
- version 10.0
- gettoken val : 0
- if (strpos("`val'", "val") > 0 ) {
= if (strpos("define", "val") > 0 ) {
gettoken val 0 : 0
syntax anything [, nofix]
if "`fix'" != "" {
local fix ", nofix"
}
gettoken var rest : anything
while `"`rest'"' != "" {
gettoken lab rest : rest
local label "`lab'"
}
local vlist : list anything - lab
if "`lab'" == "." {
local lab ""
}
foreach var of varlist `vlist' {
_label `val' `var' `lab' `fix'
}
}
- else {
- _label `macval(0)'
= _label define __00001A .1666666716337204 ".1666666716337204", add
may not label .1666666716
}
------------------------------------------------------------------------------------------------------ end label ---
}
label values `response1' `newvaluelabel'
if "`link'"=="ologit"|"`link'"=="oprobit"|"`link'"=="ocloglog" {
local firstvalue = real(word("`responsecats'",1))
local lastvalue = real(word("`responsecats'",-1))
if ~inlist(`basecategory', `firstvalue',`lastvalue') {
di as error "The basecategory must be either the first value (`response1' = `firstvalue') or last value (`response1'
> = `lastvalue') of the ordered response variable." _n
exit 198
}
}
}
------------------------------------------------------------------------------------------- end runmlwin.Estimates ---
if "`e(mcmcnofit)'" == "1" {
exit
}
timer off 99
quietly timer list
ereturn scalar time = r(t99)
timer clear 99
runmlwin_display, level(`level') `header' `group' `contrast' `fetable' `retable' `sd' `correlations' `or' `irr' `rrr'
> `mode' `median' `zratio'
}
------------------------------------------------------------------------------------------------------- end runmlwin ---
r(198);


Thanks again for your help,
Fran
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: may not label .1666666716 error message

Post by ChrisCharlton »

It looks like your response variable is not in the right format. You can confirm this with the command:

Code: Select all

levelsof sat_meanw
which should show you distinct values for this variable. In order to use this as a response for a multinomial model these should all be integer.
mlwinnewbie
Posts: 12
Joined: Tue Apr 29, 2014 12:41 pm

Re: may not label .1666666716 error message

Post by mlwinnewbie »

Hi Chris,

Thanks a lot for your quick reply and apologies for such a silly mistake!

Fran
Post Reply