Reading text and creating dummy variables.

Frequent Contributor
Posts: 96

Reading text and creating dummy variables.

Dear All,

I have a dataset with the following information: AnnouncementDate, company, Description. Announcement date is the date when company announced changed of their CEO. In my sample I have some companies announcing the resignation of their CEO and some companies announcing appointment of their CEO. The "Description" provides information on what announcement was made by the company. I want to create two columns: ResignCEOCo takes value 1 if the Company announced resignation of CEO and AppointCEOCo takes value 1 if company announced appointment of CEO. Is there any SAS code that would read the description and create the dummy variables? If yes, can someone please share with me the codes?

My current dataset looks as follows:

Park City Group Inc.15628Park City Group Names New Acting Chief Financial Officer
Petroleum Geo Services ASA15628Petroleum Geo-Services Changes Chief Financial Officer
Richtree Inc.16006Richtree Announces Resignation of Colin West as Vice President and Chief Financial Officer
Identive Group, Inc.15658SCM Microsystems Inc. elected Andrew Warner as Vice President, Finance and Chief Financial Officer
Euronet Worldwide Inc.15641Euronet Worldwide Introduces Chief Financial Officer and Office of Controller
MediSolution Ltd.15641MediSolution Announces New Chief Financial Officer
First Aviation Services Inc.16005First Aviation Services Inc. Names New Chief Financial Officer
Molex Inc.15993Molex Announces First Quarter 2003 Financial Results; Announces Second Quarter 2003 Earnings Guidance; Names Diane Bullock As Chief Financial Officer
Firestone Ventures Inc.16001Firestone Ventures Announces Appointment of Chief Financial Officer

I want my new dataset to look as follows:

Park City Group Inc.1562801
Petroleum Geo Services ASA1562801
Richtree Inc.1600610
Identive Group, Inc.1565801
Euronet Worldwide Inc.1564101
MediSolution Ltd.1564101
First Aviation Services Inc.1600501
Molex Inc.1599300
Firestone Ventures Inc.1600101

Thank you for your time.

Super Contributor
Posts: 644

Re: Reading text and creating dummy variables.

We only have one example of a resignation in the data so this suggestion is interim:

First search for keywords such as President, Chief or Vice.  If not found, return 0 for both columns

Probably exclude any row that has result in it

Next look for the string Resig.  If found, assume it is a resignation

Other wise assume it is an appointment

I would suggest you need thousands of rows of data to fine tune the algorithms

Richard in Oz

Trusted Advisor
Posts: 2,124

Re: Reading text and creating dummy variables.

Your new dataset does not look like your narrative.  None of the sample announcements were for CEO.  Also, Molex did name a new CFO, why was that not included.

Beyond those details, I am assuming that you do NOT have SAS text miner licensed.  It is designed to answer just this sort of question.

Without it, you are going to have to write a lot of fairly tedious if-then-else logic in a DATA step to heuristically pull these codes out, and every time you get a new set of data, you will have to review the code.

Frequent Contributor
Posts: 96

Re: Reading text and creating dummy variables.

Sorry guys, I meant resignation and appointment of CFO and not CEO.

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation