z**********i 发帖数: 88 | 1 I want to draw a certain sample from each stratum, or, layer. Below is the
expected size for each layer:
proc print data=size;run;
layer _NSIZE_
1 391
2 209
3 546
4 204
Below is the frequency of each stratum, or layer in the population.
proc freq data=pop;table layer;run;
Cumulative Cumulativ
layer Frequency Percent Frequency Percent
ƒƒƒƒƒƒƒƒƒƒƒƒ
402;ƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒ
402;ƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒ
1 264 12.47 264 12.47
2 984 46.48 1248 58.95
3 443 20.93 1691 79.88
4 426 20.12 2117 100.00.
When _NSIZE_ is smaller than the population in that layer,it won't select
because not enough population. I know we can use MinSize or Maxsize to
adjust. but tried many times and don't know exactly how to adjust it.
I just want it to draw as much as it can from a layer, if not enough, then
draw the rest from another layer. the total shouldn't change.
Any hint would be greatly appreciated!!!
Thank you! |
|