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   Clinton Thompson <[email protected]>
To   [email protected]
Subject   Re: st: index number of an observation
Date   Sun, 10 Mar 2013 10:35:07 +0100

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?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