Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: How to save and use the output of stata command -list-


From   Md Alauddin Majumder <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: How to save and use the output of stata command -list-
Date   Wed, 21 Aug 2013 21:46:00 +0000

Dear Statalist,
I want to save and subsequently use the output that I find from the command -list-. Can anyone tell how to do that in stata? Let me give an example to further clarify. I have a data set like the following:

IDnumber                        State             NewID
   
   1                             Alabama                .
   2                               Alaska                 .
   ..                                 ....                     ...
   ..                                 ....                     ...
   ..                                 ....                     ...
  52                            Wyoming               .

If I input -list IDnumber if State=="Wyoming"-, it returns '52'. Now I want to fill the first cell of the variable NewID by this output. How can I write code for that? Thanks in advance.

Best regards
Majumder

























*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index