Domanda

I use PROC SURVEYSELECT in SAS to sample a data set DT, OUT=DT_SAMPLED, but I would also like to have those samples in DT that didn't get selected. May I know if there is a way? Thanks in advance.

È stato utile?

Soluzione

You can use the OUTALL statement on PROC SURVEYSELECT, which will output all records with a selected flag for selected records.

proc surveyselect data=sashelp.class outall out=classsamp n=5 seed=7;
run;

proc freq data=classsamp;
tables selected;
run;

You will see 5 selected (1) and 14 unselected (0).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top