Suppose your identifiers run 1, 2, ... . If this isn't true,
. egen id = group(whateverisyourid)
will make it so.
Now, if I understand you correctly, you want to
. bysort id (entrytime):
replace somevar = . if _n == 1 & mod(id,5) == 0
Nick
[email protected]
[email protected]
> My
> question is about making an adjustment to the surrogate data set. The
> surrogate data set contains about 3500 cases, some of which
> have just one
> record per case, and others have multiple records. Each record has a
> variable recording an entering time and an exit time for that record.
> Hence, single record cases have one entry time and one exit
> time; multiple
> record cases have multiple entry and multiple exit times. I
> would like to
> convert the first entry time for every fifth multiple-record
> case in this
> data set into a missing value. Are there any suggestions for
> how this might be done.
*
* 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/