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: index number of an observation


From   Amir Kasaeian <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: index number of an observation
Date   Sun, 10 Mar 2013 15:01:55 -0700 (PDT)

Dear Clint,
I didn't catch it!
For example, I want to know what is the first observation (now by which index) more than mean in a column? I want its index number.
thanks



----- Original Message -----
From: Clinton Thompson <[email protected]>
To: [email protected]
Cc: 
Sent: Sunday, 10 March 2013, 13:05
Subject: Re: st: index number of an observation

You can create the index first w/ a system variable, like this:
gen index = _n
The variable, index, should then uniquely identify each observation in
your dataset and can then be used to reference a specific observation.
Type -findit subscripting- (without the dashes) for more information.
HTH,
Clint


On Sun, Mar 10, 2013 at 10:07 AM, Amir Kasaeian <[email protected]> wrote:
> Dear all,
>
> Good day!
> I want to catch index number of an observation in my data set. Which command or lines of codes should I use?
>
> Many thanks.
>
> Best,
> Amir
>
> *
> *   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/
*
*   For searches and help try:
*  http://www.stata.com/help.cgi?searchhttp://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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