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   "Hillgrove, Tessa (SA)" <THillgrove@arcbs.redcross.org.au>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: replace values of all members of a group with the values of one
Date   Tue, 23 May 2006 17:50:29 +1000

Thanks for your help Sebastian, it worked perfectly.
Tessa 

-----Original Message-----
From: Sebastian F. Büchte [mailto:sfbuechte@gmail.com] 
Sent: Tuesday, 23 May 2006 4:57 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: replace values of all members of a group with the values of
one

Tessa,

I need to add sth!
/* generating a variable holding the date from the appointment with
   def_inrange==1. This won't work for groups where def_inrange takes
   a missing value.

   Added: an if-condition to make sure that the command does not produce
               wrong results for groups with all def_inranges==0!

 */
 bysort donor_id (def_inrange): gen test=date[_N] if def_inrange[_N]==1

 Sebastian

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



E-mail Disclaimer:
Any personal information in this e-mail must be handled in accordance with
the provisions of the Privacy Act 1988 [Cth].  The information contained in
the e-mail may be confidential and if the person receiving the e-mail is not
the intended recipient they should immediately advise ARCBS by e-mail
response to the ARCBS sender and then deal with the e-mail as directed by
ARCBS. The views expressed in the e-mail are those of the individual sender
unless otherwise stated to be the views of ARCBS. No warranties are provided
that the e-mail is computer virus or other defect free.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index