Hi Statalisters,

Can someone please recommend a way to save a corresponding value of another set of conditions in a local/global macro. Example data:
Code:
webuse hanley, clear
senspec disease pop, sensitivity(sn) specificity(sp)
gen youdenid= sn-(1-sp)
egen youdenidmax= max(youdenid)
list youdenidmax pop if abs(youdenid-youdenidmax)<0.000001
In the above example code, I want to save the value of -pop- that corresponds to the condition if -abs(youdenid-youdenidmax)<0.000001- in a macro. I will be very grateful if someone can suggest an approach. My intention is to post this local macro in a postfile, but how to define this macro in the first instance has been a nightmare.

Regards,

Madu