14 Apr
2017
14 Apr
'17
5:02 p.m.
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@gmail.com, esumoh@moph.gov.lb
Website www.moph.gov.lb