经过调查发现,一户里人口数,从1-11,都有
我想 分组,却不知道如何分才好?
2人以下是第一组,
1-4人是第二组,
1-6人是第三组,
1-8人是第四组,
1-11人是第五组
大家觉得对吗?分组合理吗?sas语句对吗?
data pro10_4;
set pro10_3;
if a12<=2 then fguimo=1;
if a12=3 or a12=4 then fguimo=2;
if a12=5 or a12=6 or a12=7 then fguimo=3;
if a12=8 or a12=9 then fguimo=4;
if a12>=10 then fguimo=5;
run;