The HPSAMPLE Procedure

Example 9.3 Running with Client Data on the SAS Appliance

This example uses the same data set as in Example 9.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 9.3.1 shows the performance environment information.

Output 9.3.1: Performance Information

The HPSAMPLE Procedure

Performance Information
Host Node bigmath.unx.sas.com
Execution Mode Distributed
Number of Compute Nodes 2
Number of Threads per Node 1



Output 9.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 9.3.2: Frequency Table

Oversampling Frequency Table
Target Number of Obs Number of Samples
  279 17
MGR 767 46
OFFICE 948 56
OTHER 2388 142
PROFEXE 1276 76
SALES 109 87
SELF 193 12