Statalist


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

Re: st: conditional and mixed logit


From   Arne Risa Hole <[email protected]>
To   [email protected]
Subject   Re: st: conditional and mixed logit
Date   Mon, 19 Jan 2009 13:37:29 +0000

Shehzad,

First of all the -mixlogit- error message you received suggests that
you do not have the latest version of the module, type -ssc install
mixlogit, replace- to update. You will still receive an error msg but
it should be related to the fact that the model is not identified as
you have several explanatory variables with no within-group variation.

To use demographics in discrete choice models of this sort they have
to be interacted with alternative-specific constants, see the help and
manual entry for -asclogit- for more information. Make sure you can
get your -clogit- or -asclogit- model to run *before* using
-mixlogit-, if the simpler models (without random coefficients) are
not identified you can be sure that the more complicated models won't
be either.

I also strongly recommend you to follow Maarten's advice and build up
complexity gradually, start with one or two random coefficients and
take it from there.

I hope this helps.

Arne (author of -mixlogit-)

2009/1/19 Shehzad Ali <[email protected]>:
> Thank you, Maarten, this is very helpful.
>
> Regarding the demographic variables, would you use the same logic for the
> mixed logit models and leave these variables out? When I tried leaving them
> in, I keep getting conformability error with -mixlogit-.
>
> Your suggestion of not making time-related variables random makes sense but
> I still get the conformability error when using demographic variable.
>
> Regards,
>
> Shehzad
>
> On Jan 19 2009, Maarten buis wrote:
>
>> --- Shehzad Ali <[email protected]> wrote:
>>>
>>> I am using conditional and mixed logit models for discrete choice
>>> data (-clogit- and -mixlogit-). The demographic characteristics like
>>> age, sex, education etc obviously do not vary for the same
>>> respondent. When I use them the following model, Stata drops the
>>> demographic variables from the model.
>>>
>>> clogit choice length frequency benefit age sex education, group(n)
>>>
>>> Its understandable that since demographic variables do not vary
>>> within each a choice set (n) the demographic variables will not be
>>> allowed. But these variables do vary between individuals and I want
>>> to account for that. Can I use mixed logit model for this purpose?
>>
>> If you just want to control for these demographics than you can just
>> use -clogit- without the demographic variables, as information that
>> remains constant within individuals is already absorbed in the fixed
>> effects. Conceptually you can think of it as adding dummies for
>> individuals. If you do that than you can't add a dummy for sex, as all
>> the information in the sex dummy is already present in the person
>> dummy.
>>
>>> When I use the following -mixlogit- command, I get "comformability
>>> error". Can anyone please suggest why and whats the best way to
>>> accommodate demographic variables in the model?
>>>
>>> mixlogit choice, group(n) id(id) rand(length frequency benefit age
>>> sex education)
>>
>> It is usually a good idea to simplify the model by making less
>> coefficients random. Mean centering the variables usually also helps. I
>> am actually not sure whether it makes sense to make time constant
>> variables random. I am willing to be confinced either way, but it looks
>> odd to me.
>> -- Maarten
>>
>> -----------------------------------------
>> Maarten L. Buis
>> Department of Social Research Methodology
>> Vrije Universiteit Amsterdam
>> Boelelaan 1081
>> 1081 HV Amsterdam
>> The Netherlands
>>
>> visiting address:
>> Buitenveldertselaan 3 (Metropolitan), room N515
>>
>> +31 20 5986715
>>
>> http://home.fsw.vu.nl/m.buis/
>> -----------------------------------------
>>
>>
>>     *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>
> --
> Shehzad I Ali
> Department of Social Policy & Social Work
> University of York
> YO10 5NG
> +44 (0) 773-813-0094
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index