POLMETH Archives

Political Methodology Society

POLMETH@LISTSERV.WUSTL.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Omar Lizardo <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Wed, 20 Sep 2006 12:04:44 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (13 lines)
Kamilah,In the conditional logit model, your dependent variable should be a binary variable that equals 1 when subject i chooses category j and zero otherwise, with each ij combination (id by number of choices) yielding a separate observation.  Thus, it is unclear to me why would you want to fill in the missing values with those other categories ("a" or "c", etc.).  Perhaps it would be more helpful if you would clarify which one of your variables represents the different choices.  If it is the variable "ref" (as I am guessing) then (using the first case as an example) then DV should be 1 if the choice was of ref was category one and zero otherwise.  If a=1, b=2, and c=3 in ref, then you date should look like:ID  DV REF1    1    11    0    21    0    3 2    0    12    1    22    0    33    1    13    0    2 3    0    34    0    14    0    24    1    3This can be done (when the data are in wide form) using the following commands:tab REF,g(DV)reshape long DV,i(ID) j(CHOICE)And now DV is the binary variable and CHOICE has the categories.The clogit estimation now involves interaction CHOICE with the ID specific variables:xi3:clogit DV i.CHOICE*X1 i.CHOICE*X2,group(ID)etc.Omar. > Date: Wed, 20 Sep 2006 13:45:54 +0100> From: [log in to unmask]> Subject: [POLMETH] stata help> To: [log in to unmask]> >  > Dear political methodologists, >  > I am a phd student at the LSE who seeks some (simple) help in STATA. >  > I used the reshape command because I need to run a conditional logit model (also called mixed logit, Mc Fadden conditional Model, Luce model...you name it)>  > the data I have now looks like this (where dv is my dep variable)> ID  DV  ref> 1     a    1> 1     .     2> 1     .     3 > 2     b    1> 2     .     2> 2     .     3> 3     a    1> 3      .    2 > 3      .    3> 4      c   1> 4      .    2> 4      .    3> .> .> .> What I want to do is to fill those missing data with a, b, or c (order does not matter) depending on the data available (i.e b, and c if I have a, a and b if I have c, a and c, if I have b). In other words make it look like the following:>  > ID  DV  > 1     a    > 1     "b"or "c"> 1     "c"      "b"> 2     b> 2     "a"or "c"> 2     "c"     "a"> 3     a> 3      "b" or "c"> 3      "c"      "b"> 4      c> 4      "a"or "b"> 4      "b"     "a"> .        .> .        .> .        .>  >  > thank you very much for your help!> Kamilah  > ----------------------------> Kamilah KHATIB> PhD candidate> Government Department > London School of Economics> WC2A 2AE>  > > **********************************************************>              Political Methodology E-Mail List>         Editor: Karen Long Jusko <[log in to unmask]>> **********************************************************>         Send messages to [log in to unmask]>   To join the list, cancel your subscription, or modify>            your subscription settings visit:> >           http://polmeth.wustl.edu/polmeth.php> > ********************************************************** 
**********************************************************
             Political Methodology E-Mail List
        Editor: Karen Long Jusko <[log in to unmask]>
**********************************************************
        Send messages to [log in to unmask]
  To join the list, cancel your subscription, or modify
           your subscription settings visit:

          http://polmeth.wustl.edu/polmeth.php

********************************************************** 

ATOM RSS1 RSS2