This example uses the same data set as in Example 8.1. It demonstrates how to use PROC HPSAMPLE to perform oversampling.
The ods output FreqTable=Freqtab;
statement saves the frequency table to a SAS data set called Freqtab
on the client.
/*Perform the computation on the SAS appliance using 2 nodes*/ option set=GRIDHOST="&GRIDHOST"; option set=GRIDINSTALLLOC="&GRIDINSTALLLOC"; proc hpsample data=sampsio.hmeq out=out3 seed=13579 partition samppctevt=80 eventprop=.2 event="SALES"; var loan value delinq derog; class job; target job; performance nodes = 2; ods output FreqTable=Freqtab; run;
Output 8.3.1 shows the performance environment information.
Output 8.3.1: Performance Information
Output 8.3.2 shows the number of observations in each level of target variable JOB in the data set Sampsio.Hmeq
and in the sample. After oversampling, the proportion of SALES level is adjusted to 20% in the sample from the original 1.8%
in the population.
Output 8.3.2: Frequency Table