我需要实现的是计算每个套餐有多少人使用过,如何写成forvalues的语句呀,初学者,请各位大神帮忙!!谢谢~
egen rs1 = group(cust_id) if plan_chose==1
egen maxrs1= max(rs1)/* plan1总共有7008个人使用过*/
egen rs2 = group(cust_id) if plan_chose==2
egen maxrs2= max(rs2)/* plan2总共有1493个人使用过*/
egen rs3 = group(cust_id) if plan_chose==3
egen maxrs3= max(rs3)/* plan3总共有5181个人使用过*/
egen rs4 = group(cust_id) if plan_chose==4
egen maxrs4= max(rs4)/* plan4总共有1468个人使用过*/