Hello Everyone,
I have a dataset with the following information: firm_identifier, Year, Executive_Name, and Executive_biography. I want to create a new variable "Expert" that takes value 1 if the executive has a law school degree, such as JD, LL.M., or LL.D., and/or has working experience as a lawyer at, for example, a law firm or as a legal counsel.
I tried using the following code to create Expert variable.
data Want; set Have; uline= upcase(Executive_biography); if find(uline,"LL.M.") and find(uline,"JD") or find(uline,"LL.D.")or find(uline,"LAW FIRM") or find(uline,"LEGAL COUNSEL") then do; Expert=1; output; end; run;
This code creates a new dataset where Expert =1. I want a dataset that has all the observations (i.e., Expert =1 and Expert =0). Can somebody please refine this code for me?
Thank you for your time.
Regards,
S
... View more