|
Chapter Contents |
Previous |
Next |
| The ASSIGN Procedure |
A major beverage company wants to assign TV commercials to television commercial time slot openings in a way that maximizes the overall effectiveness of its television advertising. The time slots in this example begin at 7:00 on a Saturday morning and run hourly through 3:00 p.m. A combination of Nielsen TV ratings and market research testing produces an effectiveness rating for each time slot and commercial combination. The commercials are of three types: children, lifestyle, and sports. The company is willing to show up to three commercials in each time slot as long as the commercials are of different types. Which commercials should be assigned to which time slots in order to maximize the total effectiveness of its television advertising campaign? Data are missing for those time slots where certain programs are not available; for instance, no sports shows are presented during the 7:00 a.m. time slot.
The following statements produce Output 2.4.1:
title 'Assigning Televison Commercials Using the BY Statement';
data beverage;
input commercl $ type $ slot1-slot9;
datalines;
COMM1 KIDS 27.2 32.8 30.4 31.5 20.9 19.8 . . .
COMM2 KIDS 37.4 33.5 38.4 32.4 25.6 27.2 . . .
COMM3 KIDS 32.5 31.9 34.6 34.5 26.7 28.3 . . .
COMM4 LIFEST . 22.6 25.9 25.3 26.4 28.3 29.1 22.2 20.2
COMM5 LIFEST . 25.1 36.6 36.8 38.2 33.5 33.2 33.1 30.1
COMM6 LIFEST . 20.2 31.3 29.3 24.6 25.1 20.0 22.4 23.1
COMM7 SPORTS . . 25.1 26.1 28.3 36.1 29.4 31.7 34.5
COMM8 SPORTS . . 24.7 27.2 36.4 31.2 28.7 33.2 33.1
COMM9 SPORTS . 20.2 20.4 20.2 25.6 37.8 35.6 32.4 34.3
;
proc assign maximum out=newslots;
cost slot1-slot9;
id commercl;
by type;
run;
proc print;
by type;
sum _fcost_;
run;
Output 2.4.1: Assigning Television Commercials using the BY Statement
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.