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: st: mixlogit intercepts and correlation with other random coefficients
From
A S <[email protected]>
To
[email protected]
Subject
Re: st: mixlogit intercepts and correlation with other random coefficients
Date
Sun, 16 Feb 2014 11:27:10 -0800
Hi Dr. Hole,
Thank you very much for your prompt response. Sorry for the oversight
on the FAQ; I'll be sure to use my full name.
Thanks also for the clarification on the -mixlogit- command and the
reminder on intercepts in these models. I was porting code straight
from my -mlogit- code, but there's of course no intra-personal
variation embedded in the approach I had proposed.
All the best,
Ansu Sahoo
Date: Fri, 7 Feb 2014 15:46:21 +0000
From: Arne Risa Hole <[email protected]>
Subject: Re: st: mixlogit intercepts and correlation with other random
coefficients
AS
Firstly, note that the Statalist FAQ requests that posters use their
full name. See below for some responses to your questions.
> 1. Does -mixlogit- include an intercept term? A thread
> (http://statalist.1588530.n2.nabble.com/intercept-in-mixedlogit-td5140304.html)
> suggests that it does not. However, upon explicitly including a vector
> of 1s to estimate an intercept term, I receive the following error
> (NB: I am using Stata 12.1):
>
> "Some variables are collinear - check your model specification
> r(498);"
>
> I am able to use the official -mlogit- command with a vector of 1s
> (and option "noconstant") without this issue. And, I can run the
> following without an explicit intercept term without any issues:
>
> mixlogit value sw ne co, group(chid) id(subject) rand(es eswatt scwatt
> scpp) ln(2) corr nrep(500) cluster(subject)
>
> 'value' is the choice variable, and is '1' if the subject chose the
> alternative and '0' otherwise.
>
> If I add the vector of 1s to either the collection of variables with
> fixed coefficients or that with random coefficients, I receive the
> error cited above. Am I overlooking an obvious source of collinearity?
No, -mixlogit- does not include an intercept term, you have to
generate the alternative specific constants yourself and include them
in the model. Note that the constants in these models are *not*
vectors of 1s but dummy variables which equal one for the alternative
the constant represents and zero otherwise.
> 2. If mixlogit does not include an intercept term, then what is the
> best way to include it in mixlogit aside from including a vector of
> 1s?
See above.
> 3. Is there a way to allow a random intercept that is uncorrelated
> with the other random coefficients while allowing an arbitrary
> correlation structure on the latter?
Not straightforwardly, but one way of doing it is to impose zero
constraints on appropriately selected elements of the L matrix
(remember that when the -corr- option is specified -mixlogit-
estimates the elements of the lower-triangular matrix L, where the
covariance matrix for the random coefficients is given by V = LL').
Arne
*
* 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/