- 如何生成四大虚拟变量
- 将各四大分别识别出来
**生成四大虚拟变量
tab audfirm
gen big4 = regexm(audfirm,"安永|德勤|毕马威|普华") if audfirm != ""
**将各四大分别识别出来
gen ey = regexm(audfirm,"安永") if audfirm != ""
gen dtt = regexm(audfirm,"德勤") if audfirm != ""
gen kpmg = regexm(audfirm,"毕马威") if audfirm != ""
gen pwc = regexm(audfirm,"普华永道") if audfirm != ""
tab yr big4,r //row :report relative frequency within its row of each cell