Back to Tech Corner
SAS Programming

Using Holdout Control Group Feature for SAS 360 Engage Direct Marketing Tasks

Implement effective holdout control groups in SAS 360 Engage for marketing campaigns. This article explains how to design, implement, and analyze control groups in SAS Marketing Automation and Campaign Management.

Understanding Control Groups

Control groups are segments of your target audience that don't receive marketing communications, allowing you to measure the true impact of your campaigns by comparing behavior between exposed and unexposed groups.

Benefits of Control Groups

Measurement

  • True incremental lift measurement
  • ROI calculation
  • Campaign effectiveness validation
  • A/B testing capabilities

Optimization

  • Identify most effective messaging
  • Optimize targeting strategies
  • Reduce wasted spend
  • Improve customer experience

Implementing Control Groups in SAS 360 Engage

Basic Setup

sas
/* Define control group percentage */
%let control_pct = 10;  /* 10% holdout */

/* Randomly assign control status */
data campaign_audience;
  set target.customers;
  
  /* Random assignment */
  if ranuni(12345) <= (&control_pct / 100) then 
    control_group = 1;
  else 
    control_group = 0;
  
  /* Ensure representation across segments */
  call streaminit(12345);
run;

/* Stratified control group */
proc surveyselect data=target.customers
  out=stratified_control
  method=srs
  rate=0.10  /* 10% control */
  seed=12345;
  strata segment;  /* Stratify by segment */
run;

Advanced Control Group Design

sas
/* Matched control group design */
proc psmatch data=customers;
  class gender region (ref='WEST');
  psmodel treatment(treated='1') = 
    age gender region income;
  match method=greedy(k=1) 
    distance=lps 
    caliper=0.25;
  assess lps / plots=all;
  output out=matched_groups atc=_atc_;
run;

/* Create control based on propensity matching */
data control_matched;
  set matched_groups;
  where _matchwgt_ > 0 and treatment = 0;
  control_group = 1;
run;

Campaign Execution with Controls

Excluding Control Group

sas
/* Prepare campaign audience (excluding controls) */
data campaign_send_list;
  set campaign_audience;
  where control_group = 0;
  
  /* Additional campaign fields */
  campaign_id = "CAMP_2024_Q1";
  send_date = today();
  channel = "EMAIL";
run;

/* Log control group for analysis */
data campaign_control_log;
  set campaign_audience;
  where control_group = 1;
  
  campaign_id = "CAMP_2024_Q1";
  control_date = today();
  
  /* Track for future analysis */
run;

/* Append to historical controls */
proc append base=history.control_groups
  data=campaign_control_log;
run;

Measuring Campaign Impact

Response Analysis

sas
/* Analyze campaign vs control */
proc sql;
  create table campaign_results as
  select 
    case when control_group = 1 then 'Control' else 'Treatment' end as group,
    count(*) as customers,
    sum(purchased) as purchasers,
    sum(revenue) as total_revenue,
    calculated total_revenue / calculated customers as avg_revenue
  from campaign_audience a
  left join transactions t
  on a.customer_id = t.customer_id
    and t.trans_date between campaign_date and campaign_date + 30
  group by calculated group;
quit;

/* Calculate lift */
data campaign_lift;
  set campaign_results;
  by group;
  
  retain control_rate control_revenue;
  
  if group = 'Control' then do;
    control_rate = purchasers / customers;
    control_revenue = avg_revenue;
  end;
  else do;
    lift_rate = (purchasers / customers - control_rate) / control_rate * 100;
    lift_revenue = (avg_revenue - control_revenue) / control_revenue * 100;
    incremental_revenue = (avg_revenue - control_revenue) * customers;
  end;
run;

/* Report results */
proc print data=campaign_lift noobs;
  var group customers purchasers total_revenue avg_revenue 
      lift_rate lift_revenue incremental_revenue;
  format total_revenue incremental_revenue dollar15.2
         avg_revenue dollar10.2
         lift_rate lift_revenue percent8.1;
run;

Statistical Significance Testing

sas
/* Test for significant differences */
proc ttest data=campaign_audience;
  class control_group;
  var revenue;
  title "Revenue Difference: Treatment vs Control";
run;

/* Chi-square test for conversion */
proc freq data=campaign_audience;
  tables control_group * purchased / chisq;
  title "Conversion Rate Comparison";
run;

Best Practices

Design Phase

  1. Appropriate Size: Typically 5-15% control group
  2. Stratification: Ensure representation across segments
  3. Random Assignment: Use random seed for reproducibility
  4. Documentation: Record control group methodology

Implementation

sas
/* Documented control group creation */
%macro create_control_group(
  input_data=,
  output_data=,
  control_pct=10,
  strata_vars=,
  random_seed=12345
);
  
  %put NOTE: Creating control group;
  %put NOTE: Control percentage: &control_pct;
  %put NOTE: Stratification variables: &strata_vars;
  %put NOTE: Random seed: &random_seed;
  
  %if &strata_vars ne %then %do;
    /* Stratified sampling */
    proc surveyselect data=&input_data
      out=&output_data
      method=srs
      rate=%sysevalf(&control_pct/100)
      seed=&random_seed;
      strata &strata_vars;
    run;
  %end;
  %else %do;
    /* Simple random sampling */
    data &output_data;
      set &input_data;
      if ranuni(&random_seed) <= (&control_pct / 100) then
        control_group = 1;
      else
        control_group = 0;
    run;
  %end;
  
  /* Verify control group size */
  proc sql noprint;
    select count(*) * 100.0 / 
      (select count(*) from &input_data)
    into :actual_pct
    from &output_data
    where control_group = 1;
  quit;
  
  %put NOTE: Actual control percentage: &actual_pct;
  
%mend;

/* Usage */
%create_control_group(
  input_data=target.customers,
  output_data=campaign.audience,
  control_pct=10,
  strata_vars=segment region,
  random_seed=12345
);

Analysis Phase

  1. Wait Period: Allow sufficient time for impact
  2. Multiple Metrics: Analyze various KPIs
  3. Segment Analysis: Break down by customer segments
  4. Statistical Tests: Verify significance
  5. Long-term Tracking: Monitor extended effects

Integration with SAS 360 Engage

Campaign Workflow

  1. Define campaign audience
  2. Create control group (stratified)
  3. Export treatment group to 360 Engage
  4. Execute campaign
  5. Log control group details
  6. Wait for measurement period
  7. Collect response data
  8. Analyze results
  9. Report findings

Automated Reporting

sas
/* Automated control group analysis report */
%macro control_report(campaign_id=);
  ods pdf file="control_analysis_&campaign_id..pdf";
  
  title "Control Group Analysis: &campaign_id";
  
  /* Summary statistics */
  proc means data=results;
    class control_group;
    var revenue conversion_rate;
  run;
  
  /* Lift calculations */
  proc print data=lift_summary;
  run;
  
  /* Visualizations */
  proc sgplot data=results;
    vbar control_group / response=revenue stat=mean;
    title2 "Average Revenue by Group";
  run;
  
  ods pdf close;
%mend;

Conclusion

Control groups are essential for measuring true marketing impact in SAS 360 Engage campaigns. Proper design, implementation, and analysis of control groups enable data-driven marketing decisions and ROI optimization.