I'm trying to link different business locations to appropriate zip codes using a do-file. I have business names in a name variable and created a new variable to hold the zipcode. Some of the business names are similar but they have a location indicator at the end such as "Office - Allendale" and "Office-Grand Rapids". I tried using a replace command with an if statement but it doesn't appear that I can use wildcards in that. Is there a way for me to do this? Below is how I'm currently doing it...
replace zip="49401" if locationname==" Office - Allendale"
This works for just a few instances but I have a health system with hundreds of entries so trying to avoid having to individually manage each one since they have the embedded location descriptor" Thank you!
Related Posts with wildcard in string variable
Export Spearman output matrix to .pdfDear all, is it possible to export a Spearman Output (see picture) to pdf? I have tried the follow…
Panel transition model with selection - can gsem do that or what else?Dear Statalist users, I would like to draw on your expertise to learn about whether it is possible …
Add Time in Panel RegressionHello Statalist, As a beginner, I am asking a silly and simple question. In my panel data model. th…
nested forloop with putexcel and use of alphabetHello, I'm trying to export a number of tables into excel. I'm trying to build a nested forloop in …
Calculate ICC after meologit_mixed effect ordered logistic regressionDear all, I learned from Statalist that we could use the following formula to calculate icc after m…
Subscribe to:
Post Comments (Atom)
0 Response to wildcard in string variable
Post a Comment