Dear Statalists,
I have a dataset including six variables: ID PersonName ExcelPersonID CompanyName Biographies NewCompanyName1.
Variable NewCompanyName1 contains information about the company that the person in PersonName is currently working for.
Variable Biographies summarize information about the person's work experience (in PersonName) including time spent with the company in NewCompanyName1 and several others.
I would like to create a new variable which is the working period of the person (in PersonName) at the company contained in NewCompanyName1.
For example:
PersonName: Stock, Kevin (Prior)
NewCompanyName1: Michael Hill International Limited
Biographies: Mr. Kevin Stock, B Arts has been Retail General Manager of Australia at Michael Hill International Limited since 2003. Mr. Stock is responsible for the overall performance of the Australasian retail division. He moved from the United States in 1990. He started with Michael Hill in 1995 as a store management trainee in the first Melbourne store-Eastland. After managing stores for 5 years, he became a Regional Manager for 2 years in Victoria.
The new variable will be: "since 2003"
I have searched online but I could not find out any example like my task.
Any assistance is greatly appreciated.
Kh Trinh
Related Posts with Can I extract few letters from a string variable based on a conditional is another string variable?
How to interpret the outcome of command “gllamm”?Dear statalists, I have gotten the outcome of “gllamm”,but I don't know how to illustrate,could you …
Overall title when using a by option with marginsplotI am using marginsplot (in V16.1) with a by option and getting a graph I like, but I can't figure ou…
Looping across sets of variables to generate new variableHi all, This feels like a relatively simple question, so apologies if I have missed a similar answe…
Interpolate data from another periodHey guys, I work with panal data in stata Version Stata/SE 16.1. I want to do regressions in the y…
RIF regression and decomposition of income inequalityI need help to have the command which is used in this paper of Rios Avila (2019) to have the results…
Subscribe to:
Post Comments (Atom)
0 Response to Can I extract few letters from a string variable based on a conditional is another string variable?
Post a Comment