在做financial leverage的研究,如果一个公司的location(变量名)里包含Beijing or Shanghai or Jiangsu or Guangzhou,则 替换为1,否则为0.应该如何实现。
replace Location=1 if strmatch(Location,"*Brijing*")
type mismatch
r(109);
试过strmatch但是不行。
最终想做一个叫LOC的dummy,如果公司location包含Beijing or Shanghai or Jiangsu or Guangzhou就为1,否则为0.不知道怎么做。