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]

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


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: How to save and use the output of stata command -list-
Date   Wed, 21 Aug 2013 23:05:32 +0100

You have asked several variants of this question already:

http://www.stata.com/statalist/archive/2013-08/msg00697.html

http://www.stata.com/statalist/archive/2013-08/msg00844.html

http://www.stata.com/statalist/archive/2013-08/msg00847.html

and the replies have clearly not helped you. So, first, it seems that
people aren't clear on the real problem, you don't understand their
replies, or quite possibly both.

If you don't understand the replies you should be asking more
questions, or trying to make the problem clearer, or both.

-list- does not save anything. Its main job is to list data. See the
documentation http://www.stata.com/manuals13/dlist.pdf to understand
this.

That said, I don't understand your question. In your example, the
first observation is for Alabama. It makes no obvious sense why you
want to put a descriptor for Wyoming there.

Regardless, Eric Booth answered essentially the same question

http://www.stata.com/statalist/archive/2013-08/msg00846.html

http://www.stata.com/statalist/archive/2013-08/msg00848.html

but you didn't explain what was wrong with his answer.

We need much more detail from you.

Nick
[email protected]

On 21 August 2013 22:46, Md Alauddin Majumder <[email protected]> wrote:

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