Page 1 of 1

may not label .1666666716 error message

Posted: Mon May 12, 2014 10:09 am
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

Re: may not label .1666666716 error message

Posted: Mon May 12, 2014 2:20 pm
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?

Re: may not label .1666666716 error message

Posted: Mon May 12, 2014 2:35 pm
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

Re: may not label .1666666716 error message

Posted: Mon May 12, 2014 2:46 pm
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.

Re: may not label .1666666716 error message

Posted: Mon May 12, 2014 2:59 pm
by mlwinnewbie
Hi Chris,

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

Fran