|
|
|
|
|
|
c********q 发帖数: 18 | 1 求问大神们一个小问题:现有一个dataset 截取一部分hh_id指household id
hh_id person_id is_head_of_household married gender race
age voted_in_2012 is_college_graduate
1 1 1 Single Female White 28 0 1
1 2 0 Single Male White 27 1 1
2 3 1 Married Female White 34 0 1
2 4 0 Married Male White 33 1 0
2 5 0 Single Male White 6 0 1
3 6 1 Single Female White 28 0 1
3 7 0 Single Male White 29 1 0
4 8 1 Single Female White 30 0 1
4 9 0 Single FEMALE White 3 0 0
5 10 1 Single Female White 30 1 1
5 11 0 Single Male White 5 0 1
5 12 0 Single Female White 7 0 1
6 13 1 Married Female White 31 1 0
6 14 0 Married Male White 30 0 1
7 15 1 Single Female White 33 0 1
7 16 0 Single Male White 6 0 1
8 17 1 Married Female Asian 25 1 0
8 18 0 Married Male White 25 1 0
8 19 0 Single F Asian 6 0 1
9 20 1 Single Male White 31 1 0
10 21 1 Single Male White 32 1 0
如何简单有效的创建一个 “unmarried couple”的variable呢
多谢啦! 求指导! | c*********u 发帖数: 607 | | c*********u 发帖数: 607 | 3 就是先选择年龄大于比如说20,然后单身的人,按hhid分组,然后要求having的count(
distinct gender)=2,希望这把能发出来 | c********q 发帖数: 18 | 4 请问是用 proc sql来count(distinct gender)=2吗?
count(
【在 c*********u 的大作中提到】 : 就是先选择年龄大于比如说20,然后单身的人,按hhid分组,然后要求having的count( : distinct gender)=2,希望这把能发出来
|
|
|
|
|
|