DEEPCAUSAL Procedure

Example 15.1 Treatment Effect of Unemployment Insurance Bonus on Unemployment Duration

This example investigates the incentive effect of unemployment insurance (UI) by analyzing the Pennsylvania Reemployment Bonus experiment that was conducted by the US Department of Labor from July 1988 to October 1989. In the experiment, each UI claimant was randomly assigned to the control group or to one of the bonus treatment groups. The UI claimants in the treatment groups were given a corresponding bonus if they found a job within the specified qualification period. The amount of the bonus and the length of the qualification period varied across different treatment groups; the fourth treatment group had the most generous bonus offer—the highest bonus amount for the longest qualification period. For the UI claimants in the control group, no bonus was offered.

The report of the experiment with raw data is provided by W. E. Upjohn Institute for Employment Research at https://www.upjohn.org/data-tools/employment-research-data-center/pennsylvania-reemployment-bonus-demonstration. The public-use data consist of two files. This example examines the records file that contains administrative data for individuals from the participant tracking system and data for selected ineligible claimants.

The following statements load the data set of the records file into the data set mydata and then delete the duplicated rows:

/*---load .dta data set---*/
proc import out=mydata file="/dept/app/doc/viya/en/src/casecon/deepcausal/Recsfile.dta"
   dbms=dta replace;
run;
/*---delete duplicated rows---*/
proc sort data = mydata out = mydata nodupkey;
   by _all_;
run;

The variables for duration of unemployment (inuidur1), treatment group code (tg), age group dummies (agelt35 and agegt54), gender dummy (female), race dummies (black, hispanic, and othrace), number of dependents (dep), quarters of the experiment (q1–q6), major industry code (sic), and locations (site1–site12) are selected from the data set mydata. The other variables are ignored. The following statements select the corresponding variables and delete rows that have missing values:

/*---select variables---*/
data mydata;
   set mydata (keep = tg inuidur1 female black hispanic
      othrace dep q1-q6 agelt35 agegt54 site1-site12 sic);
run;

/*---delete rows with missing values---*/
data mydata;
   set mydata;
   if cmiss(of _all_) then delete;
run;

This example splits the occupations of the claimants into two categories: durable manufacturing (durable) and other occupations. The durable manufacturing dummy variable is created using the major industry code (see https://www.osha.gov/data/sic-manual and https://www2.deloitte.com/us/en/insights/economy/spotlight/economics-insights-analysis-04-2019.html). The location variables are split into three categories: areas that had a low unemployment rate and a short duration of unemployment (lusd), areas that had a high unemployment rate and a short duration of unemployment (husd), and other areas. Moreover, only the most generous treatment group 4 (tg=4) is incorporated. Treatment group 6 (tg=6) and treatment group 4 had only one difference: treatment group 4 was offered the job-search workshop, and treatment group 6 was not. Although claimants in treatment group 4 were offered the workshop, only a few of them attended it eventually. Thus, treatment groups 4 and 6 are merged into one treatment group. The following statements complete the previously mentioned data set modification and load the data into the data set selectData:

data selectData;
   set mydata;
   /*---durable occupation dummy---*/
   if sic in (24 14 33 34 35 36 37 38 39) then durable = 1;
   else durable = 0;
   /*---lusd dummy---*/
   if site1 = 1 or site4 = 1 or site12 = 1 then lusd = 1;
   else lusd = 0;
   /*---husd dummy---*/
   if site5 = 1 or site10 = 1 or site11 = 1 then husd = 1;
   else husd = 0;
   if tg=0 or tg=4 or tg=6 then output; /*group 4 and 6 will be merged later*/
run;

The treatment group (tg=4 or 6) is then assigned a value of 1, and the control group is treatment group 0 (tg=0). Finally, the binary treatment variable tg is ready for PROC DEEPCAUSAL. The outcome variable, logUIdur, which represents the log of duration of unemployment, is computed, and the ID variable is also created. The following statements complete those modifications of selectData:

data selectData;
   set selectData;
   logUIdur = log(inuidur1); * outcome variable;
   if tg=4 or tg=6 then tg=1; * merge group 4 and 6, binary treatment variable;
   i = _N_; * row id, PROC DEEPCAUSAL requires an ID variable;
run;

It is worth investigating whether the subjects are randomly assigned to the treatment group across the segments of each category covariate. The following statements generate the category variable quarter, which denotes the quarter index:

data selectData;
   set selectData;
   if q1 = 1 then quarter = 1;
   if q2 = 1 then quarter = 2;
   if q3 = 1 then quarter = 3;
   if q4 = 1 then quarter = 4;
   if q5 = 1 then quarter = 5;
   if q6 = 1 then quarter = 6;
run;

The following statements plot the mean of tg by quarter, which is shown in Output 15.1.1. The mean of tg can be seen as the proportion of the treatment group, because tg is a binary treatment (tg=0 or 1).

proc sgplot data=selectData;
   vbar quarter / response=tg stat=mean;
   yaxis grid;
run;

Output 15.1.1: Proportion of Treatment by Quarter

Proportion of Treatment by Quarter


Output 15.1.1 shows that the proportions of the treatment group of the fifth and sixth quarters are obviously different from the proportions of the other four quarters; that is, the proportion of the fifth or sixth quarter in the treatment group is different from proportions of the other four quarters. Thus, the subjects of the experiment are not randomly assigned to the treatment group across the six quarters.

To verify this conclusion, the following statements use PROC FREQ with the CHISQ option to test whether there is an association between the two category variables, tg and quarter:

proc freq data=selectData;
   tables tg*quarter / chisq cellchi2;
run;

The results are listed in Output 15.1.2, which shows that tg is significantly associated with quarter.

Output 15.1.2: Frequency Table and Chi-Square Test Results

The FREQ Procedure

Frequency
Cell Chi-Square
Percent
Row Pct
Col Pct
Table of tg by quarter
tg(treatment group)quarter
1 2 3 4 5 6Total
0
44
0.6998
0.65
1.24
46.32
722
6.1408
10.68
20.33
47.91
822
9.6928
12.16
23.14
47.13
779
9.0052
11.52
21.93
47.18
939
48.099
13.89
26.44
65.85
246
26.367
3.64
6.93
72.78
3552
 
52.54
 
 
1
51
0.7746
0.75
1.59
53.68
785
6.7971
11.61
24.46
52.09
922
10.729
13.64
28.73
52.87
872
9.9677
12.90
27.17
52.82
487
53.241
7.20
15.18
34.15
92
29.186
1.36
2.87
27.22
3209
 
47.46
 
 
Total
95
1.41
1507
22.29
1744
25.80
1651
24.42
1426
21.09
338
5.00
6761
100.00

StatisticDFValueProb
Chi-Square5210.6996<.0001
Likelihood Ratio Chi-Square5215.3130<.0001
Mantel-Haenszel Chi-Square1132.3424<.0001
Phi Coefficient 0.1765 
Contingency Coefficient 0.1738 
Cramer's V 0.1765 


In the same way, you can test whether the subjects of the experiment are randomly assigned to the treatment group across segments of other category variables, such as female.

Before you investigate the causal effect of tg by using PROC DEEPCAUSAL, the following statements calculate the descriptive statistics of the outcome variables for the control and treatment groups, respectively:

proc means data=selectData;
   class tg;
   var logUIdur;
run;

The results are shown in Output 15.1.3.

Output 15.1.3: Summary Statistics for the Control and Treatment Groups

The MEANS Procedure

Analysis Variable : logUIdur
treatment groupN ObsNMeanStd DevMinimumMaximum
0355235521.96600141.256712803.9512437
1320932091.89386351.239199103.9512437


The statistical inference can be used to test whether the association, double-struck upper E left-bracket logUIdur vertical-bar tg equals 1 right-bracket minus double-struck upper E left-bracket logUIdur vertical-bar tg equals 0 right-bracket, is significantly less than 0. However, directly considering the association statistical inference result to be ATE is biased because the experiment is not fully randomized. Thus, the experiment is seen as an observational study.

The following DATA step loads the data set selectData into a data table in your session that is associated with the mylib libref. The DATA step assumes that your libref is named mylib, but you can substitute any appropriately defined libref.

data mylib.selectData;
   set selectData;
run;

The following statements use PROC DEEPCAUSAL to estimate ATE and other parameters of interest of the treatment variable, tg:

proc deepcausal data=mylib.selectData;
   id i;
   psmodel tg=female black othrace dep q2 q3 q4 q5 q6 agelt35
      agegt54 durable lusd husd / dnn=(nodes=(32 32 32 32)
      train=(optimizer=(miniBatchSize=125
         regL1=0.35 regL2=0.004 maxEpochs=1000
         algorithm=adam(learningRate=0.025))
         nthreads=5 seed=12345));
   model logUIdur=female black othrace dep q2 q3 q4 q5 q6 agelt35
      agegt54 durable lusd husd / dnn=(nodes=(32 32 32 32)
      train=(optimizer=(miniBatchSize=120
         regL1=0.0035 regL2=0.0035 maxEpochs=1000
         algorithm=adam(learningRate=0.0005))
         nthreads=5 seed=12345));
   infer out=mylib.oest outdetails=mylib.odetails;
run;

The number of observations is shown in Output 15.1.4.

Output 15.1.4: Number of Observations

The DEEPCAUSAL Procedure

Number of Observations6761
Observations with Missing Covariates0
Observations with Missing Covariates for PS Model0
Observations with Missing Covariates for Outcome Model0
Observations with Missing Outcome0


The estimates of parameters of interest are shown in Output 15.1.5, which shows that ATE on log unemployment duration is significantly negative at the 5% level.

Output 15.1.5: Parameters of Interest

Population Parameter Estimates
ParameterPotential
Outcome
EstimateStandard
Error
95% Confidence LimitsZPr > |Z|
Average01.9715540.0208621.9306662.01244294.51<.0001
Average11.8876030.0217201.8450321.93017486.90<.0001
ATE -0.0839510.029844-0.142445-0.025458-2.810.0049

Subpopulation Parameter Estimates
ParameterPotential
Outcome
Treatment
Level
EstimateStandard
Error
95% Confidence LimitsZPr > |Z|
Conditional Average001.9660010.0310021.9052382.02676463.42<.0001
Conditional Average011.9777010.0326281.9137512.04165160.61<.0001
Conditional Average101.8819470.0308441.8214931.94240161.01<.0001
Conditional Average111.8938630.0326461.8298791.95784858.01<.0001
ATT 1-0.0838370.029756-0.142157-0.025517-2.820.0048
ATU 0-0.0840550.029949-0.142753-0.025356-2.810.0050
Composition Effect1 0.0119170.046271-0.0787740.1026070.260.7968
Observed Difference  -0.0721380.055933-0.1817640.037488-1.290.1971


For more information about the estimates of parameters of interest, policy evaluation, and policy comparison, see the sections Full-Population Average Effect Parameters and Subpopulation Average Effect Parameters.

Last updated: July 09, 2026