[EpiData-list] indexing records in epidatastat and retrieving values

EpiData development and support epidata-list at lists.umanitoba.ca
Fri Apr 14 17:02:14 CDT 2017


Dear Sir,
I am trying to retrieve value of variables based on other variables.

Example: a dataset with 3 observations:
#        region_code       ill
1        21                         4
2        30                        10
3        40                         6

i have tried the following:

sort region_code
gen i s =_n
@ill[1]

but i am getting the result of the last observation and not the first.

I will be thankful if you advise on how to retrieve the value of a variable
based on record indexing.
Sincerely
Nada
-- 
Nada Ghosn, MD
Head, Epidemiology Surveillance Program (Esumoh)
Ministry of Public Health
Beirut, Museum square
Lebanon
Tel +961.1.614194
Fax +961.1.610920
Email esumohleb at gmail.com, esumoh at moph.gov.lb
Website www.moph.gov.lb


More information about the EpiData-list mailing list