|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: select single observations with value closest to target value
From |
Joseph Wagner <[email protected]> |
To |
[email protected] |
Subject |
Re: st: select single observations with value closest to target value |
Date |
Fri, 09 Nov 2007 17:44:01 -0500 |
That abs-olultely nailed it! Thanks Maarten and good night.
Maarten buis wrote:
--- Maarten buis <[email protected]> wrote:
It's too late for me:
gen diff = abs(age - 18)
bysort ptno (diff): gen select = 1 if _n == 1
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
*
* 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/
--
Joseph H. Wagner, M.P.H.
Lifespan Health Research Center
Wright State University Boonshoft School of Medicine
3171 Research Blvd.
Kettering, OH 45420-4014
(937) 775-1494 (LHRC office)
(937) 775-1456 (fax)
[email protected]
Visit the Lifespan Health Research Center Home Page at:
http://www.med.wright.edu/lhrc
*
* 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/