Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: st: -mixlogit- numeric overflow


From   Arne Risa Hole <[email protected]>
To   statalist <[email protected]>
Subject   Re: Re: st: -mixlogit- numeric overflow
Date   Thu, 14 Nov 2013 10:52:32 +0000

Filippo

Thanks, that confirms my suspicion. You need to do

egen csid = group(ID Set)
mixlogit Choice bill, rand(_covariates_) group(csid) id(ID)

Arne

On 14 November 2013 09:46, Filippo Maria D'Arcangelo
<[email protected]> wrote:
> Arne,
>
> sorry for the late reply. Hereafter an extract of our dataset:
> +--------------------------------------------------------+
>      ID   Set   Alter   Choice   bill    [dummy covariates]
> ---------------------------------------------------------
> individual 1:
> 100080     1       1        1     10
> 100080     1       2        0     50
> 100080     1       3        0      0
> 100080     2       1        1     50
> 100080     2       2        0    100
> --------------------------------------------------------
> 100080     2       3        0      0
> 100080     3       1        0    100
> 100080     3       2        0    100
> 100080     3       3        1      0
> - + - + - + - + - + - + - + - + - + - + - + - + - + - +
> Other choices from same individual......
> - + - + - + - + - + - + - + - + - + - + - + - + - + - +
> individual 2:
> 100081     1       1        0     10
> 100081     1       2        1     50
> 100081     1       3        0      0
> 100081     2       1        0     50
> 100081     2       2        1    100
> --------------------------------------
> 100081     2       3        0      0
> 100081     3       1        1    100
> 100081     3       2        0    100
> 100081     3       3        0      0
> +--------------------------------------+
> Other individuals.....
>
>
> We use Set as our "group" variable, so it seems that we are doing it wrong.... Our stata command is
> mixlogit Choice bill, rand(_covariates_) group(Set) id(ID).
> Regards,
>
> Filippo
>
>
>
>>Filippo
>>
>>I suspect your "group" variable is incorrectly defined - is it a
>>unique identifier for each choice situation as required, or does it
>>take the values 1,2,...,8 for each respondent? Also, please show us
>>your exact -mixlogit- syntax as requested in the Statalist FAQ.
>>
>>Arne (author of -mixlogit-)
>>
>>On 5 November 2013 11:09, Filippo Maria D'Arcangelo
>><[email protected]> wrote:
>>> Dear statalisters,
>>>
>>> I'm running a mixed logit following Hole (2007) [http://www.stata-journal.com/sjpdf.html?articlenum=st0133].
>>> I have a dataset of 24000 observations, that is 1000 individuals, 8 choice situations and 3 alternatives per situation (i.e. 1000 * 8 * 3 = 24000).
>>> As soon as I run -mixlogit- with 7 independent variables (almost equally divided in the [indepvar] and rand(varlist) places) I receive the following error:
>>> 3000 (group size) take 1000 (# positives) combinations results in numeric overflow; computations cannot proceed
>>>
>>> I keep on receiving the error, no matter how I rearrange the covariates (or if I reduce them). I get the same message even if I reduce the number of observations.
>>> I even tried to use the option [form] with a vector as a starting point with the mean of the covariates as per Hole (2007).
>>> Any suggestion?
>>>
>>> Filippo Maria D'Arcangelo
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index