[EpiData-list] How to: checking for duplicate records

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Jan 17 19:08:32 CST 2006


Some of the line breaks in the example did not come through properly. 
This is how I ran it:
***********
Read "C:\Program Files\EpiData\validate\estimates\bromar.rec"
gen s(25) k = "s:" + trim(string(sex) )
k = trim(k) + "a:" + trim(string(age) )
k = trim(k) + "d:" + trim(string(dectime) )
sort k
gen x=1
aggregate k  /sum=x /close /notable
freq n
***********
It works fine. I think you were not executing the 'aggregate' statement.
With /close, the 'aggregate' command closes your working file and 
creates a new one with the following fields:
k, n, nx, sumx
For this example, n, nx and sumx are the same values.

Jamie Hockin
Public Health Agency of Canada



More information about the EpiData-list mailing list