Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Get back to original sample data


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Get back to original sample data
Date   Sun, 5 Jun 2011 10:20:17 +0100

gen is4 = substr(string(sich), 1, 1) == "4"

... if is4

Nick

On Sun, Jun 5, 2011 at 9:32 AM, Achmed Aldai <Hauptseminar@gmx.de> wrote:
> Hi
>
> I am currently working on a do file where I am eliminating firms of different industries. Here is an extract
>
> gvkey           sich
> 1001            1120
> 1001            1120
> 1001            1120
> 1001            1120
> 1001            1120
> 1200            2310
> 1200            2310
> 1200            2310
> 1200            2310
> 3201            4320
> 3201            4320
> 3210            4335
> 3210            4335
>
> If I drop e.g. all firms with a beginning sich of 4: After this analysis I want to have all the firms in my sample again. So how can I come back to the complete sample again to do another analysis.
> I want to have all this in the same do file.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index