p*****o 发帖数: 543 | 1 I HAVE AN ORIGINAL DATA SET WITH VARIABLE: ID,AND THE DATA SET LOOKS LIKE:
ID
1_A
1_B
1_C
1_D
2_A
2_B
2_C
2_D
.....
.....
100_A
100_B
100_C
100_D
我现在只需要一半的数据(RANDOMLY SELECTED), 但问题是,如果选择了1_A,那么 1_B,
1_C 还有 1_D 也必须被选上?
试了PROC SURVEYSELECT,但是不知道如何处理这个问题,请大侠赐教!!
THANKS A LOT!! | l***a 发帖数: 12410 | 2 split the name into two variables (1,a)... (100,d). then transpose
【在 p*****o 的大作中提到】 : I HAVE AN ORIGINAL DATA SET WITH VARIABLE: ID,AND THE DATA SET LOOKS LIKE: : ID : 1_A : 1_B : 1_C : 1_D : 2_A : 2_B : 2_C : 2_D
| o****o 发帖数: 8077 | 3 sample the numbers, instead of all instances individually | p*****o 发帖数: 543 | 4 could you tell me a little bit more....
which procedure? proc surveyselect? how could i only random sampling the
numbers?
thanks a lot
【在 o****o 的大作中提到】 : sample the numbers, instead of all instances individually
| p*****o 发帖数: 543 | 5 then transpose again after sampling? sounds good!
thanks !!
【在 l***a 的大作中提到】 : split the name into two variables (1,a)... (100,d). then transpose
| o****o 发帖数: 8077 | 6 in your sampling scheme, you will select all records that have the same
prefix number as the one you selected, which means the rest are not randomly
selected but only the first one, which amounts to select the numbers 1,...,
100
so that you use proc surveyselect to randomly choose 50 numbers and merge
with the original data on their numbering
【在 p*****o 的大作中提到】 : could you tell me a little bit more.... : which procedure? proc surveyselect? how could i only random sampling the : numbers? : thanks a lot
| p*****o 发帖数: 543 | 7 thanks a lot!!
randomly
1,...,
merge
【在 o****o 的大作中提到】 : in your sampling scheme, you will select all records that have the same : prefix number as the one you selected, which means the rest are not randomly : selected but only the first one, which amounts to select the numbers 1,..., : 100 : so that you use proc surveyselect to randomly choose 50 numbers and merge : with the original data on their numbering
|
|