![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Perform the sampling of a given dataset following PROC SURVEYSELECT method.
idsn : a dataset;sampsize, method, nreps, seed, strata : (option) arguments of the PROC SURVEYSELECT; default: 1, SRS (i.e. simple random sampling), 1 (no repetition), '' (not specified/used) and '' respectively;var : (option) list of (unquoted and blank-separated) strings that store the name of the variables/fields (which must exist in the dataset) to be returned in odsn;ilib : (option) name of the input library; by default: empty, i.e. WORK is used.odsn : name of the output table where the sampled data (of size sampsize, see above) will be stored;olib : (option) name of the output library; by default: empty, and the value of ilib is used.Let us consider the table _dstest31 as follows:
| geo | value | unit |
|---|---|---|
| BE | 0 | EUR |
| AT | 0.1 | EUR |
| BG | 0.2 | NAC |
| LU | 0.3 | EUR |
| FR | 0.4 | NAC |
| IT | 0.5 | EUR |
we then shall run the sampling of geo and value fields only:
which returns (seed not set) into the dataset dsn the following table:
| geo | unit |
|---|---|
| BG | NAC |
| FR | NAC |
Run macro %_example_ds_sample for more examples.
strata is not passed: or in case strata is specified:
with the parameters defined above. Check the online documentation of the PROC SURVEYSELECT procedure for more details.
SIZE (sampling unit size measure) statement is made, which implicitly means that you cannot perform unequal probability sampling with this macro.PROC SURVEYSELECT. Therefore alternative macros have been implemented for SRS and URS methods; the SYS method should also be implemented in a later version.Fan, C.T., Muller, M.E., and Rezucha, I. (1962): "Development of sampling plans by using eequential (item by item) selection techniques and digital computers", JASAS, 57(298):387-402, DOI: 10.2307/2281647.