Hello Statalist,
Please forgive me if this is a stupid question; I am new to Stata. I am working with a dataset that has one variable listing the names of businesses and another listing the names of the towns in which the businesses are established. I want to test the business names for whether or not they contain the name of their respective towns. For example, if the name of the business is "Corinth Lumber Co." and the business is in Corinth, I want that to come back positive. Furthermore, I would like to create a binary variable on the same dataset to house the results, with 1 for positive and 0 for negative. Any advice for how I would go about doing this? I really don't know where to start.
Related Posts with Testing to see if the value of categorical variable x for string m contains the value of variable y for string m.
Delete words and rename variablesDear All How can I delete first words from a variable and retain the remaining words. Please find b…
calculating an average across observations which have common characteristicsI am attempting to calculate an average (mean) across observations which have common characteristics…
putpdf "failed to add paragraph" when savingI am using putpdf to save 2 .png files into one pdf document. Code: putpdf begin putpdf paragraph…
Formatting numbers saved in a local and using these in a text outputHello community! I am having troubles understanding the formatting of numbers, or more likely under…
xtgls commandHi everyone, I have a panel data (T=9 and N=24) and I have the three following problems: - heterosce…
Subscribe to:
Post Comments (Atom)
0 Response to Testing to see if the value of categorical variable x for string m contains the value of variable y for string m.
Post a Comment