Statalist The Stata Listserver


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

Re: st: replace values of all members of a group with the values of one


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: replace values of all members of a group with the values of one
Date   Tue, 23 May 2006 09:12:29 +0200

The following did not do what Tessa wanted

. gen test = date if  def_inrange == 1
. bysort  donor_id  def_inrange date (test): replace test = test[1]
--------------------------------------------------------

You should:
   .... : replace test=test[_N]

Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [email protected]
__________________________________________

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