Statalist The Stata Listserver


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

RE: st: Generate question


From   "Hendri Adriaens" <[email protected]>
To   <[email protected]>
Subject   RE: st: Generate question
Date   Fri, 27 Apr 2007 13:38:42 +0200

> I am not following this closely, but it may be that
> 
> bysort y (x) : replace x = x[_N] 
> 
> is what you want. 
> 
> gsort y - x
> by y : replace x = x[1] 

Unfortunately, this didn't work either, mainly because I found some missing
x for some y that didn't have anything iin other records for the same y. But
luckily, I have the merge working now and will repair the remaining cases by
hand.

Thanks anyway for the help, best regards,
-Hendri.


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