I am trying to label names to ethics in my dataset A, so far I've collected all the names in my data and containing surnames in such format:
company Names
aaa jacky liu jenny xia
bbb benny chong alice wong
ccc ben chua larry Tse
What I can do is gen ethics = "Cantonese" if strpos(Names,"WONG""TSE"), and so on to generate a new variable to label each company. But I have another dataset B about all the surnames in different ethics. So I want to import that dataset to do it, then I don't need to manually type all the surnames in the strpos. What can I do?
The format of the separate dataset for all the surnames is in this format:
Mandarin Cantonese Hokkien ....
xxx xxx xxx
xxx xxx xxx
xxx xxx xxx
so the xxx represents each surname that may contain in the first dataset A.
Related Posts with How to label data by keywords using shortcuts?
Standardisation of variables and differing standardised coefficientsHi all, for my bachelor thesis I want to find out individual factors that promote a (regular) parti…
How to round the wanted output valuesDuplicated post due to internet lagging and double-clicking. My apology …
Input pre-defined logistic regression equation in stataHello Everyone, Please am in need of help. I am trying to use a previously published logistic regr…
Problem With Monthly Lag Variables Not Lagging Across New YearsDear Statalist Masters, My first post here at statalist, after having been a passive reader for sev…
Question about an ARIMA model with white noise testI am trying to find an ARIMA model for the unemployment rate in Boston after the data is differenced…
Subscribe to:
Post Comments (Atom)
0 Response to How to label data by keywords using shortcuts?
Post a Comment