Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Select observations within variable


From   "Nikolaos Kanellopoulos" <[email protected]>
To   <[email protected]>
Subject   RE: st: Select observations within variable
Date   Mon, 26 Feb 2007 23:11:39 -0000

Nick and Austin,

Thank you very much for your help.

Regards
Nikos 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Monday, February 26, 2007 9:51 PM
To: [email protected]
Subject: RE: st: Select observations within variable

Alternatively, check out -tsspell- from SSC. 

Nick
[email protected] 

Austin Nichols
 
> Like so?
> bys i (t): gen red2=sum(x<x[_n-1] & _n>1)>0
 
Nikolaos Kanellopoulos 

> > I have a very common panel data set. i is my individual
> identifier, t my
> > time variable and x is a categorical variable. I want to
> create a variable
> > that will be 1  for all the observations of the same
> individual after x is
> > reduced. ie I want to identify all the observations for the
> same individual
> > after a reduction on x has taken place. Note that a
> reduction does not
> > happen to all individuals.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

__________________________________________________
�������������� Yahoo!;
���������� �� ���������� �������� (spam);   �� Yahoo! Mail �������� ��� �������� ������ ��������� ���� ��� ����������� ���������  
http://mail.yahoo.gr 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index