Dear Martin,
Thank you very much , I have sought this command for 15 days!! Now it is
ok and my dataset works.
Have a nice day
Isabelle
>
> <>
>
> Difficult case...
>
> *************
> clear*
> inp siren str20 country taxrate
> 17251067 Spain 0.35
> 36320950 "Czech Republic" 0.31
> 45750817 Tunisia 0.33
> end
>
> g byte choice =1
> compress
>
> fillin siren country
> format siren %9.0f
>
> replace choice=0 if choice==.
> bys country (taxrate): replace taxrate=taxrate[1]
> drop _fillin
> sort siren (country)
>
> l, noo sepby(sir)
> *************
>
>
>
> HTH
> Martin
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von
> [email protected]
> Gesendet: Dienstag, 10. März 2009 12:04
> An: [email protected]
> Betreff: st: problem in the preparation of my dataset to run a conditional
> logit model
>
> Hello,
>
> I have a dataset whose beginning is this one:
>
> siren country tax
> 17251067 Spain .35
> 36320950 Czech Republic .31
> 45750817 Tunisia .33
>
> "Country" is the investment location choice of firms called "siren". Tax
> is the statutory corporate tax rate of the country.
> (There are other firms' and countries' characteristics that I did'nt
> indicate)
>
> I would like to shift my dataset like that:
>
> siren country tax choice
> 17251067 Czech Republic .31 0
> 17251067 Spain .35 1
> 17251067 Tunisia .33 0
> 36320950 Czech Republic .31 1
> 36320950 Spain .35 0
> 36320950 Tunisia .33 0
> 45750817 Czech Republic .31 0
> 45750817 Spain .35 0
> 45750817 Tunisia .33 1
>
>
> With this new dataset I aimed at writing to stata:
> ****
> clogit choice country tax, group(siren)
> ****
> The problem is that I don't know how to transform my dataset, and I don't
> find anything on the Internet. Could someone indicate me what kind of
> command I can deal with?
>
>
> Thank you very much for help
>
> Isabelle
>
>
> *
> * 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/
>
*
* 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/