Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: conditional logit (clogit) where number of choices=number of dummy indicators


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: conditional logit (clogit) where number of choices=number of dummy indicators
Date   Thu, 21 Dec 2006 04:36:45 -0000 (GMT)

John Fulton wrote:

> Hi.  I am running a clogit as McFadden's choice model with c choices,1
> record per choice within each chooser's "group."  I  created c dummies
> to interact with characterisics of choosers, but stata always drops one
> dummy due to collinearity.
> My question is: what exactly is the cause of collinearity here?
>
> My guess is that the c choices just also happens to be equal to the
> number of records within each group, so that it is more a matter of
> degrees of freedom than it is collinearity.  That is, once stata has
> considered c-1 choices, the cth choice - and it always is the last one -
> is determined.
>
> This is somewhat confusing because standard practice in ols regressions
> without intercepts is to include dummies for all c categories of an
> indicator, rather than the more typical case of c-1 dummies in
> regressions with intercepts.  Since conditional logit intercepts drop
> out, I thought c dummies would be called for.

In addition to Partha's answer, one way to recover the dropped dummy
variable is to use -lincom- after -clogit-, once you have constrained all
c dummies to zero. An example:

. webuse choice

. tab car, gen(c)

        car |      Freq.     Percent        Cum.
------------+-----------------------------------
   American |        295       33.33       33.33
      Japan |        295       33.33       66.67
     Europe |        295       33.33      100.00
------------+-----------------------------------
      Total |        885      100.00

. g jcar=c2-c1

. g ecar=c3-c1

. xi3: clogit choice jcar ecar i.car*sex i.car*income i.car*size dealer,
  group(id)

[...]

Conditional (fixed-effects) logistic regression   Number of obs   =      885
                                                  LR chi2(9)      =   161.49
                                                  Prob > chi2     =   0.0000
Log likelihood = -243.34694                       Pseudo R2       =   0.2491

----------------------------------------------------------------------------
    choice |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
      jcar |   .6399729   .4997662     1.28   0.200    -.3395508    1.619497
      ecar |   -.892834   .6577246    -1.36   0.175    -2.181951    .3962827
  _Ica2Xse |  -.4159877   .3229522    -1.29   0.198    -1.048962     .216987
  _Ica3Xse |   .6420416   .4598369     1.40   0.163    -.2592221    1.543305
  _Ica2Xin |   .0404964   .0136811     2.96   0.003      .013682    .0673107
  _Ica3Xin |   .0358444   .0138744     2.58   0.010     .0086511    .0630377
  _Ica2Xsi |  -.6007247   .1619616    -3.71   0.000    -.9181637   -.2832858
  _Ica3Xsi |  -.2042099   .1991577    -1.03   0.305    -.5945517     .186132
    dealer |   .1268065   .0427065     2.97   0.003     .0431033    .2105098
----------------------------------------------------------------------------

. lincom -jcar-ecar

 ( 1) - jcar - ecar = 0

----------------------------------------------------------------------------
    choice |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
       (1) |   .2528611    .584204     0.43   0.665    -.8921577     1.39788
----------------------------------------------------------------------------

Note that -sex-, -income- and -size- do not vary, hence their interaction
with -car-. We shall call the recovered parameter -acar-!

Hope that helps.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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