Sunteți pe pagina 1din 9

TURF: Total Unduplicated Reach and Frequency

Example of how to use SAS TURF

The XYZ Company wants to place an advertisement in magazines whose content is directed
toward XYZ's target audience. Suppose that 12 such magazines exist, yet XYZ has sufficient
funds to advertise in only 5 of these magazines. XYZ wants to maximize the extent to which its
advertisement is viewed at least once by members of the target audience. Note that some
persons will subscribe to multiple magazines, such that if they see the advertisement in one
magazine then they will see it in another one they subscribe to, presuming the advertisement
appears in both magazines. The task for XYZ, then, is to select the combination of 5 magazines
that maximizes the number of persons in the target audience that sees the advertisement at
least once.

Data File

1. The data consists of 1,455 cases of subscribers to 12 magazines. Subscribers might


receive from 1-12 of the magazines. The data are entered as 1, 0, wherein a score of 1
indicates that the person subscribes to that magazine.
2. The TURF1 program identifies the top 5 combinations of magazines that maximize reach
(i.e., contacting the most number of subscribers).
3. The TURF2 program provides frequency counts for each of the top three combinations.

Combinations That Maximize Reach

The SAS program prints the top 10 combinations of 5 magazines that maximize reach.

Top Ten
Target Sets Reach Groups

1 781 1-6-7-8-11
2 781 1-6-7-10-11
3 781 1-7-8-10-11
4 779 1-3-6-7-10
5 779 1-3-7-8-11
6 778 1-4-7-8-11
7 777 1-3-7-8-10
8 777 1-7-8-9-11
9 777 6-7-8-10-11
10 776 1-3-6-7-8
Combinations That Maximize Frequency

The first three combinations of magazines have identical scores on reach. That is, each
combination includes 781 subscribers at least once.

The scores shown below for each combination are the number of repeated times subscribers
will view an advertisement. For example, for the combination 1-6-7-8-11, 105 of the 781
observations reached will see the advertisement 5 times, 78 of the observations will see the
advertisement 4 times, and so on.

The results indicate that the combination 1-7-8-10-11 maximizes reach (i.e., 781) and has the
highest number of 3, 4, and 5 repeated viewings of the advertisement. All else being equal
(e.g., cost of advertising in the combination), this combination seems to be the best choice for
maximizing reach and frequency of 3-4-5 repeated viewings.

Combination Viewings Frequencies

1-6-7-8-11 5 105
4 78
3 146
2 186
1 266
781

1-6-7-10-11 5 108
4 89
3 172
2 198
1 214
781

1-7-8-10-11 5 114
4 100
3 179
2 178
1 210
781
TURF1: Identify the Top Ten Combinations of Magazines to Maximize Reach

OPTIONS PAGENO=1 PAGESIZE=56 NONOTES NOSOURCE NOSOURCE2 ERRORS=10;


LIBNAME DISK1 'C:\Users\ssapp\Documents\Sapp\Teaching\SOC512\Lectures\09 TURF\Soc512TURFExample';
DATA TURF;
SET DISK1.TURFEX;
*
* This program is designed to pick 5 from 12 possible targets.
*
* Define the macro 'PICK5'.
*;
%MACRO PICK5;
*
* Initialize the data set "BB".
*;
DATA BB;
%LET Y=Y;
*
* These five DO loops will pan through all possible pick-5 of the Y columns.
*;
%DO P5=5 %TO 12;
%DO P4=4 %TO %EVAL(&P5-1);
%DO P3=3 %TO %EVAL(&P4-1);
%DO P2=2 %TO %EVAL(&P3-1);
%DO P1=1 %TO %EVAL(&P2-1);
*
* The data set "TEMP" is temporary and has meaning only while in the inner most
* part of the loop (which is represented by a specific column grouping of P1 to P5).
*;
DATA TEMP; SET TURF;
*
* Create new variable 'MAX5' as the maximum of the five respective columns.
* A '1' means the pick-5 reached the person, a '.' means they were not reached
* by the pick-5.
*;
MAX2=MAX(Y&P5,Y&P4);
MAX3=MAX(MAX2,Y&P3);
MAX4=MAX(MAX3,Y&P2);
MAX5=MAX(MAX4,Y&P1);
*
* Get the sum of the values in the MAX5 column and create the data set "AA" that
* will hold this sum. This sum represents the 'reach' of this pick-5.
*;
PROC MEANS SUM NOPRINT;
VAR MAX5;
OUTPUT OUT=AA SUM=REACH;
*
* Add a column to "AA" to describe what pairing this REACH is associated with.
*;
DATA AA; SET AA;
GROUP=SYMGET('P1')||"-"||SYMGET('P2')||"-"||SYMGET('P3')||"-"||SYMGET('P4')||"-"||SYMGET('P5');
*
* Each time through the loop, add this information as another row to the "BB" data set.
*;
DATA BB; SET BB AA;
IF REACH=. THEN DELETE;
%END; %END; %END; %END; %END;
%MEND PICK5;
*
* Run the 'PICK5' macro which creates the data set "BB".
*;
%PICK5;
*
* Print the 'reach' of each pick-5 (plus the group description, which is listed under 'GROUP').
*;
PROC SORT DATA=BB; BY DESCENDING REACH;
DATA LOOK; SET BB; IF _N_ LE 10;
PROC PRINT;
VAR REACH GROUP;
RUN;
Results of TURF1

Obs REACH GROUP


1 781 1-6-7-8-11
2 781 1-6-7-10-11
3 781 1-7-8-10-11
4 779 1-3-6-7-10
5 779 1-3-7-8-11
6 778 1-4-7-8-11
7 777 1-3-7-8-10
8 777 1-7-8-9-11
9 777 6-7-8-10-11
10 776 1-3-6-7-8
TURF2: Calculate the Frequencies of Viewing for the Top Three Combinations of Magazines.

OPTIONS PAGENO=1 PAGESIZE=56;


LIBNAME DISK1 'C:\Users\ssapp\Documents\Sapp\Teaching\SOC512\Lectures\09 TURF\Soc512TURFExample';
DATA TURF2;
SET DISK1.TURFEX;
*
* Count the number of multiple contacts among the best pick-5 combinations.
* This program is run after the TURF1 program to select the best combination
* among those combinations with the maximum reach.
*
* Calculate frequencies for the 1-6-7-8-11 combination;
SUMC1 = SUM(OF Y1 Y6 Y7 Y8 Y11);
IF SUMC1 = 5 THEN SUMC15 = 1;
IF SUMC1 = 4 THEN SUMC14 = 1;
IF SUMC1 = 3 THEN SUMC13 = 1;
IF SUMC1 = 2 THEN SUMC12 = 1;
IF SUMC1 = 1 THEN SUMC11 = 1;
* Calculate frequencies for the 1-6-7-10-11 combination;
SUMC2 = SUM(OF Y1 Y6 Y7 Y10 Y11);
IF SUMC2 = 5 THEN SUMC25 = 1;
IF SUMC2 = 4 THEN SUMC24 = 1;
IF SUMC2 = 3 THEN SUMC23 = 1;
IF SUMC2 = 2 THEN SUMC22 = 1;
IF SUMC2 = 1 THEN SUMC21 = 1;
* Calculate frequencies for the 1-7-8-10-11 combination;
SUMC3 = SUM(OF Y1 Y7 Y8 Y10 Y11);
IF SUMC3 = 5 THEN SUMC35 = 1;
IF SUMC3 = 4 THEN SUMC34 = 1;
IF SUMC3 = 3 THEN SUMC33 = 1;
IF SUMC3 = 2 THEN SUMC32 = 1;
IF SUMC3 = 1 THEN SUMC31 = 1;
*;
PROC FREQ; TABLES SUMC15 SUMC14 SUMC13 SUMC12 SUMC11;
PROC FREQ; TABLES SUMC25 SUMC24 SUMC23 SUMC22 SUMC21;
PROC FREQ; TABLES SUMC35 SUMC34 SUMC33 SUMC32 SUMC31;
RUN;
Results of TURF2

The FREQ Procedure

Cumulative Cumulative
SUMC15 Frequency Percent Frequency Percent
1 105 100.00 105 100.00
Frequency Missing = 1350
Cumulative Cumulative
SUMC14 Frequency Percent Frequency Percent
1 78 100.00 78 100.00
Frequency Missing = 1377
Cumulative Cumulative
SUMC13 Frequency Percent Frequency Percent
1 146 100.00 146 100.00
Frequency Missing = 1309
Cumulative Cumulative
SUMC12 Frequency Percent Frequency Percent
1 186 100.00 186 100.00
Frequency Missing = 1269
Cumulative Cumulative
SUMC11 Frequency Percent Frequency Percent
1 266 100.00 266 100.00
Frequency Missing = 1189

The FREQ Procedure

Cumulative Cumulative
SUMC25 Frequency Percent Frequency Percent
1 108 100.00 108 100.00
Frequency Missing = 1347
Cumulative Cumulative
SUMC24 Frequency Percent Frequency Percent
1 89 100.00 89 100.00
Frequency Missing = 1366
Cumulative Cumulative
SUMC23 Frequency Percent Frequency Percent
1 172 100.00 172 100.00
Frequency Missing = 1283
Cumulative Cumulative
SUMC22 Frequency Percent Frequency Percent
1 198 100.00 198 100.00
Frequency Missing = 1257
Cumulative Cumulative
SUMC21 Frequency Percent Frequency Percent
1 214 100.00 214 100.00
Frequency Missing = 1241

The FREQ Procedure

Cumulative Cumulative
SUMC35 Frequency Percent Frequency Percent
1 114 100.00 114 100.00
Frequency Missing = 1341
Cumulative Cumulative
SUMC34 Frequency Percent Frequency Percent
1 100 100.00 100 100.00
Frequency Missing = 1355
Cumulative Cumulative
SUMC33 Frequency Percent Frequency Percent
1 179 100.00 179 100.00
Frequency Missing = 1276
Cumulative Cumulative
SUMC32 Frequency Percent Frequency Percent
1 178 100.00 178 100.00
Frequency Missing = 1277
Cumulative Cumulative
SUMC31 Frequency Percent Frequency Percent
1 210 100.00 210 100.00
Frequency Missing = 1245

S-ar putea să vă placă și