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

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
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Statistic | DF | Value | Prob |
|---|---|---|---|
| Chi-Square | 5 | 210.6996 | <.0001 |
| Likelihood Ratio Chi-Square | 5 | 215.3130 | <.0001 |
| Mantel-Haenszel Chi-Square | 1 | 132.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
| Analysis Variable : logUIdur | ||||||
|---|---|---|---|---|---|---|
| treatment group | N Obs | N | Mean | Std Dev | Minimum | Maximum |
| 0 | 3552 | 3552 | 1.9660014 | 1.2567128 | 0 | 3.9512437 |
| 1 | 3209 | 3209 | 1.8938635 | 1.2391991 | 0 | 3.9512437 |
The statistical inference can be used to test whether the association, , 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
| Number of Observations | 6761 |
|---|---|
| Observations with Missing Covariates | 0 |
| Observations with Missing Covariates for PS Model | 0 |
| Observations with Missing Covariates for Outcome Model | 0 |
| Observations with Missing Outcome | 0 |
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 | |||||||
|---|---|---|---|---|---|---|---|
| Parameter | Potential Outcome | Estimate | Standard Error | 95% Confidence Limits | Z | Pr > |Z| | |
| Average | 0 | 1.971554 | 0.020862 | 1.930666 | 2.012442 | 94.51 | <.0001 |
| Average | 1 | 1.887603 | 0.021720 | 1.845032 | 1.930174 | 86.90 | <.0001 |
| ATE | -0.083951 | 0.029844 | -0.142445 | -0.025458 | -2.81 | 0.0049 | |
| Subpopulation Parameter Estimates | ||||||||
|---|---|---|---|---|---|---|---|---|
| Parameter | Potential Outcome | Treatment Level | Estimate | Standard Error | 95% Confidence Limits | Z | Pr > |Z| | |
| Conditional Average | 0 | 0 | 1.966001 | 0.031002 | 1.905238 | 2.026764 | 63.42 | <.0001 |
| Conditional Average | 0 | 1 | 1.977701 | 0.032628 | 1.913751 | 2.041651 | 60.61 | <.0001 |
| Conditional Average | 1 | 0 | 1.881947 | 0.030844 | 1.821493 | 1.942401 | 61.01 | <.0001 |
| Conditional Average | 1 | 1 | 1.893863 | 0.032646 | 1.829879 | 1.957848 | 58.01 | <.0001 |
| ATT | 1 | -0.083837 | 0.029756 | -0.142157 | -0.025517 | -2.82 | 0.0048 | |
| ATU | 0 | -0.084055 | 0.029949 | -0.142753 | -0.025356 | -2.81 | 0.0050 | |
| Composition Effect | 1 | 0.011917 | 0.046271 | -0.078774 | 0.102607 | 0.26 | 0.7968 | |
| Observed Difference | -0.072138 | 0.055933 | -0.181764 | 0.037488 | -1.29 | 0.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.