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:
"Kamilah khatib, LSE" <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Wed, 20 Sep 2006 13:45:54 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
 
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

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

ATOM RSS1 RSS2