Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: AW: problem in the preparation of my dataset to run a conditional logit model


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: AW: problem in the preparation of my dataset to run a conditional logit model
Date   Wed, 11 Mar 2009 09:47:51 +0100

<> 


Most of the time the answer to questions such as yours is a judicious
combination of http://www.stata.com/support/faqs/data/#manip, the whole
array of Stata tips in http://www.stata-journal.com/archives.html and a
thorough knowledge of the "Data" menu entries in Stata. Glad it worked out
for you :-) Next time access the list earlier? 



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von
[email protected]
Gesendet: Mittwoch, 11. März 2009 09:15
An: [email protected]
Betreff: Re: st: AW: problem in the preparation of my dataset to run a
conditional logit model

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/


*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index