9. Athey, S., Chetty, R., Imbens, G. W., & Kang, H. (2019). The surrogate index: Combining short-term proxies to estimate long-term treatment effects more rapidly and precisely (No. w26463). National Bureau of Economic Research.#

Reference_paper

Reference code

9.1. Setup#

Consider a setting with two samples: an Experimental (\(E\)) sample and an Observational (\(O\)) sample. The experimental and observational sample contain observations on \(N_E\) and \(N_O\) units, respectively. It is convenient to view the data as consisting of a single sample of size \(N = N_E + N_O\), with \(\mathrm{P, O, E}\) a binary indicator for the group to which unit \(i\) belongs.

For the \(N_E\) individuals in the experimental group, there is a single binary treatment of interest, \(W_i\{0, 1\}\), and a primary outcome, denoted by \(Y_i\). This outcome is not observed for individuals in the experimental sample. However, we do measure intermediate outcomes, which we refer to as surrogates (to be defined precisely in Section 3.2), denoted by \(S_i\) for each individual. Typically, the surrogate outcomes are vector-valued in order to make the properties we define plausible. Finally, we measure pre-treatment covariates \(X_i\) for each individual. These variables are known not to be affected by the treatment.

Following the potential outcomes framework or Rubin Causal Model (Rubin 1974; Holland 1986; Imbens and Rubin 2015), individuals in this group have two pairs of potential outcomes: \(\left(Y_i(0), Y_i(1)\right)\) and \(\left(S_i(0), S_i(1)\right)\). The realized outcomes are related to their respective potential outcomes as follows.

\[\begin{split} Y_i=\left\{\begin{array}{ll}Y_i(0) & \text { if } W_i=0, \\ Y_i(1) & \text { if } W_i=1,\end{array} \quad\right. \quad \text{and } S_i = \left\{ \begin{array}{ll}S_i(0) & \text { if } W_i=0, \\ S_i(1) & \text { if } W_i=1,\end{array} \right . \end{split}\]

Overall, the units are characterized by the values of the sextuple \(\left(Y_i(0), Y_i(1), S_i(0), S_i(1), X_i, W_i\right)\). We do not observe the full sextuple for any units. Rather, for units in the experimental sample we observe only the triple \(\left(X_i, W_i, S_i\right)\) with support \(\mathbb X, \mathbb W = \{0, 1\}\), and \(\mathbb S\) respectively. In the observational sample, we do not observe to which treatment the NO individuals were assigned. We observe the triple \((X_i, S_i, Y_i)\), with support \(\mathbb X, \mathbb S\), and \(\mathbb Y\) respectively.

We are interested in the average effect of the treatment on the primary outcome in the population from which the experimental sample is drawn:

\[ \tau = \mathbb{E}[ y_i(1) - Y_i(0) | P_i = E ] \]

or similar estimands, such as the average primary outcome for the treated units, or for some other subpopulation. For ease of exposition, we focus on estimating the ATE \(\tau\) here. The fundamental problem in estimating \(\tau\) in the experimental group is that the outcome \(Y_i\) is missing for all units in the experimental sample. To address this missing data problem, we exploit the observational sample and its link to the experimental sample through the presence of the surrogate outcomes \(S_i\). Note that the surrogates, like the pre-treatment variables, are not of intrinsic interest. The average causal effect of the treatment on the surrogates, \(\tau_S = E[S_i(1) − S_i(0)|P_i = \mathrm E]\), is of interest only insofar as it aids in estimation of \(\tau\).

9.2. Identification#

In this section, we discuss three assumptions that together allow us to combine the observational and experimental samples and estimate the causal effect of the treatment on the primary outcome using a set of intermediate outcomes. The first assumption is unconfoundedness or ignorability, common in the program evaluation literature, which ensures that adjusting for pre-treatment variables leads to valid causal effects. The second assumption is the surrogacy condition, which we define more precisely below, and is the key condition that allows to use the surrogate variables to proxy for the primary outcome. The third assumption is comparability, which ensures that we can learn about relationships in the experimental sample from the observational sample. After stating these three assumptions, we present our main identification result, showing how the ATE on the primary outcome can be identified by combining intermediate outcomes under these assumptions.

9.2.1. Unconfoundedness#

For the individuals in the experimental group, define the propensity score as the conditional probability of receiving the treatment: \(e(x) = \mathrm{pr}\left(Wi = 1 | X_i = x, P_i = E\right)\). We assume that for individuals in the experimental group, treatment assignment is unconfounded and we have overlap in the distribution of pre-treatment variables between the treatment and control groups (Rosenbaum and Rubin 1983).

Assumption 1. (Unconfounded Treatment Assignment / Strong Ignorability)

\((i)\quad W_i \perp\left(Y_i(0), Y_i(1), S_i(0), S_i(1)\right) \mid X_i, P_i=\mathrm{E}\)

\((ii) \quad 0<e(x)<1\) for all \(x \in \mathbb{X}\).

This assumption implies that in the experimental group, we could estimate the average causal effect of the treatment on the outcome \(Y_i\) by adjusting for pre-treatment variables, if the \(Y_i\) were measured.

9.2.2. Surrogacy and the Surrogate Index#

Because the primary outcome is not measured in the experimental group, we exploit surrogates to identify the treatment effect of \(W\) on \(Y\) . The defining property of these surrogates \(S_i\) is the following condition

Assumption 2 (Surrogacy)

\[ W_i \perp Y_i \mid S_i, X_i, P_i = \mathrm E. \]

Intuitively, the surrogacy condition requires that the surrogates fully capture the causal link between the treatment and the primary outcome. Figure 1 illustrates the content of this assumption using directed acyclical graphs to represent the causal chain from the treatment to the surrogate to the long-term outcome, as in Pearl (1995). Panel A shows a DAG where the surrogacy assumption is satisfied by a single intermediate outcome \(S\) that lies on the causal chain between \(W\) and \(Y\) . Panel B shows an example where Assumption 2 is violated because there is a direct effect of the treatment on the outcome that does not pass through the surrogate.

Panel \(C\) shows our approach to addressing this problem: introducing multiple intermediate outcomes that together span the causal chain from \(W\) to \(Y\) . In this example, the three inter- mediate outcomes together span the causal chain from \(W\) to \(Y\) and hence can be combined to construct a surrogate index that captures long-term treatment effects. Importantly, one does not necessarily have to observe every intermediate outcome that lies on the causal chain between \(W\) and \(Y\) . For example, if a treatment (e.g., smaller class sizes) affects earnings by increasing both math and science aptitude, math scores by themselves could serve as a valid surrogate if math and science scores are perfectly correlated. The key requirement is that the set of inter- mediate outcomes together span the set of causal pathways, either because they themselves are the causal factors or because they are correlated with the causal factors.

It is instructive to compare the surrogacy assumption to the exclusion restriction assumption familiar to economists in instrumental variables settings. Figure 1d shows a DAG representation of the standard instrumental variables (IV) model, where there is an unobserved confounder between \(W\) and \(Y\) . In the standard IV approach, this confound is addressed by introducing an instrument \(Z\) that affects \(W\) but does not affect \(Y\) directly (the exclusion restriction). In the surrogacy case, we are interested in the effect of \(W\) on \(Y\) , where we assume there is no confounder between \(W\) and \(Y\) (or, equivalently, we find an instrument for \(W\) that eliminates such confounds). This is analogous to the (reduced-form) effect of \(Z\) on \(Y\) in the IV case. The reduced-form effect can be estimated directly in the IV case because \(Z\) and \(Y\) are both observed in the same dataset. The problem we address here is how to estimate the effect of \(Z\) (or \(W\), assuming unconfoundedness) on \(Y\) when they are not observed in the same dataset. The analog to the exclusion restriction here is that there is no direct effect of \(W\) on \(Y\) that does not run through \(S\).

We exploit the availability of multiple intermediate outcomes by defining two concepts: the surrogate index and surrogate score.

9.2.2.1. Deffinition 1:#

The surrogate Index: The surrogate index is the conditional expectation of the primary outcome given the surrogate outcomes and the pre-treatment variables in the observational sample:

\[ h_0(s, x) = \mathbb{E}[Y_i|S_i = s, X_i = x, P_i = O] \]

The surrogate index \(h_0(s, x)\) is estimable because we observe the triple \(\left(Y_i, S_i, X_i\right)\) in the observational sample. In a linear model, the surrogate index is simply a linear combination of the individual intermediate outcomes – the predicted value from a regression of the primary outcome on the intermediate outcomes.

9.2.2.2. Definition 2#

The Surrogate Score: The surrogate score is the conditional probability of having received the treatment given the value for the surrogate outcomes and the covariates:

\[ r(s, x) = pr(W_i = 1 | S_i = s, X_i = s, P_i = \mathrm{E}) \]

Like the propensity score, the surrogate score facilitates statistical procedures that adjust only for scalar differences in other variables, irrespective of the dimension of the statistical surrogates.

9.2.2.3. Proposition 1#

Surrogate Score: Suppose Assumption 2 holds. Then:

\[ W_i \perp Y_i \mid r(S_i, X_i, P_i) = \mathrm{E} \]

9.3. Comparibility#

Surrogacy and unconfoundedness by themselves are not sufficient for consistent estimation of \(\tau\) by itself because they do not place restrictions on how the relationship between \(Y\) and \(S\) in the observational sample compares to that in the experimental sample. The final assumption we make is that the conditional distribution of \(Y_i\) given (\(S_i\), \(X_i\)) in the observational sample is the same as the conditional distribution of \(Y_i\) given (\(S_i\), \(X_i\)) in the experimental sample. Formally, Assumption 3. (Comparability of Samples)

Assumption 3. (Comparability of Samples)

\[ Y_i\left|S_i, X_i, P_i=\mathrm{O} \sim Y_i\right| S_i, X_i, P_i=\mathrm{E} \]

We can state this assumption equivalently as:

\[ P_i \perp Y_i | S_i, X_i \]

To understand the role of the comparability assumption, note that there are two conditional expectations that are closely related to the conditional expectation in the definition of the surrogate index above, but which we cannot directly estimate because we do not observe \(Y\) in the experimental sample. The first is the conditional expectation corresponding to the definition of the surrogate index above within the experimental sample:

\[ h_E(s, x) = \mathbb{E}\left[Y_i | S_i, X_i = x, P_i = E\right] \]

The second is the conditional expectation of the potential outcomes given pre-treatment variables and the surrogates:

\[ \mu _E(s, x, w) = \mathbb{E}\left[Y_i | S_i = s, X_i = x, W_i = w, P_i = E\right] \]

These conditional expectations are all equivalent under comparability and surrogacy, allowing us to take the relationship between \(Y\) and \(S\) estimated in the observational sample and apply it in the experimental sample. In effect, comparability and surrogacy together allow us to impute the missing primary outcomes in the experimental sample, as shown by the following proposition.

9.3.1. Proposition 2#

Surrogate Index:

(i) Suppose Assumption 2 holds. Then:

\[ \mu_E(s, x, w) = h_E(s, x), \quad \text{for all } s \in \mathbb{S}, \quad x \in \mathbb{X}, \text{and } w \in \mathbb{W} \]

(ii) Suppose Assumption 3 holds. Then:

\[ h_E(s, x) = h_O(s, x) \text{ for all } s \in S, \text{ and } x \in X \]

(iii) Suppose Assumptions 2 and 3 hold. Then:

\[ \mu_E(s, x, w) = h_O(s, x) \text{ for all } s \in S, x \in X, \text{ and } w \in W. \]

Part (iii) of Proposition 2 relates the conditional expectation of interest, \(\mu_E(s, x, w)\), to a conditional expectation that is directly estimable, \(h_O(s, x)\). Finally, we define weights that make the observational and experimental samples comparable. Let \(q = N_E/(N_E + N_O)\) denote the sampling weight of being in the experimental sample and \((1 − q)\) be the sampling weight of being in the observational sample. Define the propensity to be in the experimental sample \(P_i = E\) as follows:

9.3.2. Definition 3#

Sampling Score

\[ t(s, x) = \mathrm{pr}\left(P_ = E| S_i = s, X_i = x\right) = \frac{ \mathrm{pr(S_i = s, X_i = x | P_i = E})q }{ \mathrm{ pr(S_i = s, X_i = x| P_i = E) q + pr(S_i = s, X_i = x | P_i = \mathrm{O})(1 - q) } } . \]

We also make the assumption:

Assumption 4: Overlap in Sampling Score

\[t(s, x) < 1 \text{ for all } x \in \mathbb{S} \text{ and } x \in \mathbb{X}\]

9.3.3. Identification#

We now present our central identification result. We present three different representations of the average treatment effect that lead to three estimation strategies. The motivation for developing the different representations is that estimators corresponding to those different representations can have different properties in finite samples. The first representation requires estimation of the surrogate index, but not the surrogate score. The second representation instead requires estimation of the surrogate score, but not the surrogate index. The third representation requires estimation of both.

We define the following three objects, all functionals of distributions that are directly estimable from the data, starting with a surrogate index representation:

\[ \tau^{\mathrm{E}}=\mathbb{E}\left[h_{\mathrm{O}}\left(S_i, X_i\right) \cdot \frac{W_i}{e\left(X_i\right)}-h_{\mathrm{O}}\left(S_i, X_i\right) \cdot \frac{1-W_i}{1-e\left(X_i\right)} \mid P_i=\mathrm{E}\right] \]

then a surrogate score representation

\[ \begin{align}\begin{aligned}\begin{split} \begin{aligned} \tau^O= & \mathbb{E}\left[Y_i \cdot \frac{r\left(S_i, X_i\right) \cdot t\left(S_i, X_i\right) \cdot(1-q)}{e\left(X_i\right) \cdot\left(1-t\left(S_i, X_i\right)\right) \cdot q}\right.\\\end{split}\\\begin{split} & \left. -Y_i \cdot \frac{\left(1-r\left(S_i, X_i\right)\right) \cdot t\left(S_i, X_i\right) \cdot(1-q)}{\left(1-e\left(X_i\right)\right) \cdot\left(1-t\left(S_i, X_i\right)\right) \cdot q} \mid P_i=\mathrm{O}\right]\\ \end{aligned} \end{split}\end{aligned}\end{align} \]

and finally an influence function repretentation:

\[ \tau^{\mathrm{O}, \mathrm{E}} = \mathbb{E}[ \psi (P_i, Y_i, S_i, W_i, X_i) ] \]

where

\[\begin{split} \begin{aligned} \psi(p, y, s, w, x) =&\frac{1_{p=\mathrm{E}}}{q}\left(\frac{h_{\mathrm{O}}(s, x) w}{e(x)}-\frac{h_{\mathrm{O}}(s, x)(1-w)}{1-e(x)}\right) \\ &+ \frac{1_{p=\mathrm{O}}}{1-q}\left(\frac{t(s, x)}{1-t(s, x)} \frac{1-q}{q}\right) \frac{\left(y-h_{\mathrm{O}}(s, x)\right)(r(s, x)-e(x))}{e(x)(1-e(x))} . \end{aligned} \end{split}\]

Theorem 1. (Identification) Suppose Assumptions 1–4 hold. Then the average treatment effect is equal to the following three estimable functions of the data:

\[ \tau \equiv \mathbb{E}[ Y_i(1) - Y_i(0)|P_i = \mathrm{E} ] = \tau ^ \mathrm{E} = \tau ^ \mathrm{O} = \tau ^ {\mathrm{O, E}}. \]

The first representation, \(\tau_E\), shows how \(\tau\) can be written as the expected value of the propensity-score-adjusted difference between treated and controls of the surrogate index in the experimental sample. This will lead to an estimation strategy in which the missing \(Y_i\) in the experimental sample are imputed by \(\hat h(S_i, X_i)\) estimated on the observational sample. The second representation, \(\tau^\mathrm O\), shows how \(\tau\) can be written as the expected value of the difference in two weighted averages of the outcome in the observational sample, with the weights a function of the surrogate score estimated on the experimental sample and the sampling score. This will lead to an estimation strategy in which the \(Y_i\) in the observational sample are weighted proportional to the estimated surrogate score to estimate \(\mathbb E[Y_i(1)|P_i = \mathrm E]\), and weighted proportional to one minus the estimated surrogate score to estimate \(\mathbb E[Y_i(0)|Pi = E]\). The third representation uses the score function representation, requiring estimation of both the surrogate score and the surrogate index.

Under smoothness assumptions, we can derive the semi-parametric efficiency bound for \(\tau\) (e.g., Bickel et al. 1993; Newey 1990). Because the model is just identified (the model has no testable implications), it follows that the semi-parametric efficiency bound is the square of the influence function \(\psi(\cdot) - \tau\):

\[ \begin{align}\begin{aligned} \begin{aligned}\\\begin{split}\mathbb{V}_s = & \mathbb{E}\left[\left(\psi\left(P_i, Y_i, X_i, S_i, W_i\right)-\tau\right)^2\right] \\\end{split}\\\begin{split}= &\mathbb{E}\left[\frac{\sigma^2\left(S_i\right)}{1-t\left(S_i, X_i\right)} \cdot\left(\frac{r\left(S_i, X_i\right)}{e\left(X_i\right)^2}+\frac{1-r\left(S_i, X_i\right)}{\left(1-e\left(X_i\right)\right)^2}-2 \cdot \frac{r\left(S_i, X_i\right) \cdot\left(1-r\left(S_i, X_i\right)\right)}{e\left(X_i\right)^2 \cdot\left(1-e\left(X_i\right)\right)^2}\right)\right.\\\end{split}\\& \left.+\frac{1}{t\left(S_i, X_i\right)} \cdot\left\{\frac{r\left(S_i, X_i\right)}{e\left(X_i\right)} \cdot\left(\mu\left(S_i, X_i\right)-\mu_1\right)^2+\frac{1-r\left(S_i, X_i\right)}{1-e\left(X_i\right)} \cdot\left(\mu\left(S_i, X_i\right)-\mu_0\right)^2\right\}\right] \end{aligned} \end{aligned}\end{align} \]

Again because of the just-identified nature of this model, the results in Newey (1994) also imply that nonparametric estimators of the surrogacy score, the surrogacy index, and the propensity score can be used to obtain efficient estimators for \(\tau\)

9.4. Import modules#

library(haven)
library(data.table)
library(ggplot2)
library(farver)
library(broom)
library(purrr)
library(usefun)
Attaching package: ‘purrr’
The following object is masked from ‘package:data.table’:

    transpose
Attaching package: ‘usefun’
The following object is masked from ‘package:purrr’:

    is_empty

9.5. Data Wrangling#

# Import Data
dat = read_dta("https://github.com/OpportunityInsights/Surrogates-Replication-Code/raw/master/Data-raw/simulated%20Riverside%20GAIN%20data.dta")
head(dat)
A tibble: 6 × 39
idsitetreatmentemp1emp2emp3emp4emp5emp6emp7emp27emp28emp29emp30emp31emp32emp33emp34emp35emp36
<dbl><chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1Riverside001111111111111111
2Riverside000000000000000000
3Riverside000000000000000000
4Riverside010001111110000010
5Riverside010000010010000000
6Riverside000000000000000000
# To replicate the following stata regression (`reg treatment `outcome'1-`outcome'`q' `), 
## we created the following function

emp_eq <- function(n, y = "emp_cm36", x_v = "emp") {
    eq = paste(y,"~ emp1", sep="")
    
    add <- function(x1, x = x_v) {
        return(paste("+",x,x1,sep=""))
    }
    vl = 2
    while (vl < n+1) {
    eq = paste(eq,add(vl), collapse = "+")
    vl = vl +1
    }
    return(eq)
}
data = data.frame(dat)

for (i in 1:36) {
    data[,"emp_cm1"] = data[,"emp1"]
    if (i >1){
        data[,paste("emp_cm", i, sep="")] = data[,paste("emp", i, sep="")] + data[,paste("emp_cm", i-1, sep="")]
    }
}

for (i in 1:36) {
    data[,paste("emp_cm", i, sep="")] = data[,paste("emp_cm", i, sep="")] / i
}

y_reg = list()
y_reg1 = list()
y_reg2 = list()
bias = list()
surrogate_index = list()

naive_index = list()
emp_weight_p = list()
emp_weight_se = list()

## Store regressions
for (i in 1:36) {
    data_1 = data[which(data$treatment ==1),]
    y_reg[[i]] = lm(formula = emp_eq(i), data = data_1)
    
    emp_weight_p[[i]] = as.matrix(y_reg[[i]]$coefficients)
    emp_weight_se[[i]] = confint(y_reg[[i]])
    
    data[,'y_surrogate'] = predict(y_reg[[i]], newdata = data)
    surrogate_index[[i]] = lm("y_surrogate ~ treatment", data = data)
    
    y_reg1[[i]] = lm(formula = paste("emp_cm36 ~ emp",i, sep=""), data = data_1)
    data[, paste('single_surrogate',i, sep="")] = predict(y_reg1[[i]], newdata = data)
    naive_index[[i]] = lm(paste(paste("single_surrogate",i, sep=""),"~ treatment"), data = data)
    
    ## Create naive estimate of treatment effect on mean
    y_reg2[[i]] = lm(paste(paste("emp_cm",i, sep=""),"~ treatment"), data = data)
    
    ## Create "ground truth": experimental estimate of treatment effect on mean
    exp_reg = lm("emp_cm36 ~ treatment", data = data)
    
    ## Bias
    bias[[i]] = lm(emp_eq(i, "treatment"), data = data)
}
Warning message in summary.lm(object, ...):
“essentially perfect fit: summary may be unreliable”

9.6. Tables#

9.6.1. Appendix Table 1#

Estimates of Treatment Effects on Employment and Earnings Over Nine Years, Varying Quarters of Data Used to Construct Surrogate Index

for (i in c(6,12)){
    ett = c(round(as.data.frame(summary(surrogate_index[[i]])[4])[2,1],4), round(as.data.frame(summary(surrogate_index[[i]])[4])[2,2],3))
    cat(paste(i, " - Quarter Estimate Treatment Effect \t", ett[1], "\n \t\t\t\t\t(", (ett[2]), ")\n", sep=""))
}

quarter = c(6,12)
to_append = list()
for (j in 1:2) {
    to_append[[j]] = data.frame()
    list1 = map_df(list(y_reg[[quarter[j]]]), tidy)[,1:3]
    se_function = function(x){
        paste("(",x,")")
    }
    std = data.frame(lapply(list1[,3],se_function))
    list1[,"std.error"] = std
    for (i in 1:(quarter[j]+1)){
        a = t(list1[i,2:3])
        to_append[[j]] = rbind(to_append[[j]],a)
    }
    to_append[[j]][,"id"] = 1:(2*(quarter[j]+1))
}

row_names = c()
for (i in 1:quarter[2]){
    row_names[1] = "intercept"; row_names[2] = ""
    row_names[2*(i+1)] = ""
    row_names[2*i+1] =paste("emp",i, sep = "")
}

col_names = c("Six - Quarter(Surrogate Index)","Twelve - Quarter(Surrogate Index)")

table1 = merge(to_append[[1]], to_append[[2]][,1:2], by="id", all=TRUE)[,2:3]
colnames(table1) = col_names
table1[,"emp"] = row_names
table1 = table1[, c(3,1,2)]

val_r = c()
val_r_aj = c()
for (i in 1:2){
    val_r[i] = summary(y_reg[[quarter[i]]])$r.squared
    val_r_aj[i] = summary(y_reg[[quarter[i]]])$adj.r.squared
}
vec_1 = c(val_r[1], val_r_aj[1]); vec_2 = c(val_r[2], val_r_aj[2])

df1 =  data.frame(vec_1, vec_2)
colnames(df1) = col_names
df1[,"emp"] = c("R-squared", "R-squared Adj.")
table2 = rbind(table1,df1)
table2
6 - Quarter Estimate Treatment Effect 	0.0748
 					(0.007)
12 - Quarter Estimate Treatment Effect 	0.0789
 					(0.009)
A data.frame: 28 × 3
empSix - Quarter(Surrogate Index)Twelve - Quarter(Surrogate Index)
<chr><chr><chr>
intercept 0.1297902 0.07602309
( 0.00488392591540597 )( 0.00391246868203882 )
emp1 0.07537089 0.05816225
( 0.0103732162679794 ) ( 0.00803345931352488 )
emp2 0.0178405 0.02675253
( 0.0105723441697418 ) ( 0.00818326727395926 )
emp3 0.08122723 0.04927895
( 0.0112986454010462 ) ( 0.00876102150233213 )
emp4 0.06074282 0.02433046
( 0.0118614942433539 ) ( 0.00922029724239229 )
emp5 0.09700807 0.04665635
( 0.0117480625743477 ) ( 0.00915499111918546 )
emp6 0.2276304 0.05601819
( 0.0103099194178721 ) ( 0.00971699257687244 )
emp7 NA 0.04147453
NA ( 0.0100982249425754 )
emp8 NA 0.02895029
NA ( 0.0102458630114004 )
emp9 NA 0.06422899
NA ( 0.0103695641333328 )
emp10 NA 0.04840837
NA ( 0.0112256056621833 )
emp11 NA 0.07403544
NA ( 0.011601261793924 )
emp12 NA 0.2167955
NA ( 0.0097191582288501 )
R-squared 0.432099887917566 0.660791722117448
R-squared Adj.0.431325126509541 0.659864923543998

9.6.2. Appendix Table 2#

Estimates of Treatment Effects on Employment and Earnings Over Nine Years, Varying Quarters of Data Used to Construct Surrogate Index

cat("Quarter Used\t", "Employment\t", "Earnings\n")
for (i in 1:36){
    c_ef = specify_decimal(as.data.frame(summary(surrogate_index[[i]])[4])[2,1],4)
    s_e = specify_decimal(as.data.frame(summary(surrogate_index[[i]])[4])[2,2],3)
    cat(paste(i,"\t\t", c_ef, "\t", " .","\n\t\t", s_e, "\t", "(.)\n", sep = " "))
}
Quarter Used	 Employment	 Earnings
1 		 0.0155 	  . 
		 0.003 	 (.)
2 		 0.0374 	  . 
		 0.004 	 (.)
3 		 0.0528 	  . 
		 0.005 	 (.)
4 		 0.0579 	  . 
		 0.006 	 (.)
5 		 0.0715 	  . 
		 0.006 	 (.)
6 		 0.0748 	  . 
		 0.007 	 (.)
7 		 0.0748 	  . 
		 0.007 	 (.)
8 		 0.0763 	  . 
		 0.008 	 (.)
9 		 0.0800 	  . 
		 0.008 	 (.)
10 		 0.0783 	  . 
		 0.008 	 (.)
11 		 0.0799 	  . 
		 0.008 	 (.)
12 		 0.0789 	  . 
		 0.009 	 (.)
13 		 0.0781 	  . 
		 0.009 	 (.)
14 		 0.0786 	  . 
		 0.009 	 (.)
15 		 0.0788 	  . 
		 0.009 	 (.)
16 		 0.0712 	  . 
		 0.009 	 (.)
17 		 0.0749 	  . 
		 0.009 	 (.)
18 		 0.0765 	  . 
		 0.010 	 (.)
19 		 0.0746 	  . 
		 0.010 	 (.)
20 		 0.0769 	  . 
		 0.010 	 (.)
21 		 0.0741 	  . 
		 0.010 	 (.)
22 		 0.0729 	  . 
		 0.010 	 (.)
23 		 0.0741 	  . 
		 0.010 	 (.)
24 		 0.0737 	  . 
		 0.010 	 (.)
25 		 0.0727 	  . 
		 0.010 	 (.)
26 		 0.0686 	  . 
		 0.010 	 (.)
27 		 0.0675 	  . 
		 0.010 	 (.)
28 		 0.0653 	  . 
		 0.010 	 (.)
29 		 0.0645 	  . 
		 0.010 	 (.)
30 		 0.0634 	  . 
		 0.011 	 (.)
31 		 0.0647 	  . 
		 0.011 	 (.)
32 		 0.0628 	  . 
		 0.011 	 (.)
33 		 0.0630 	  . 
		 0.011 	 (.)
34 		 0.0616 	  . 
		 0.011 	 (.)
35 		 0.0624 	  . 
		 0.011 	 (.)
36 		 0.0620 	  . 
		 0.011 	 (.)

9.7. Figures#

# Colours
cl = c("#75b74d", "#226fa5")
x_lbl = "Quarters Since Random Assignment"

9.7.1. Figure 2: Employment Rates in Riverside GAIN Treatment vs. Control Group, by Quarter#

data = copy(dat)
df = as.data.frame(t(aggregate(data[,c(1,4:length(data))], list(data$treatment), FUN=mean)))
df = df[2:dim(df)[1],]*100
colnames(df) = c("c","t")
df[,"x"] = 0:36
df = df[which(df$x > 0),]
t_m = mean(df$t)
c_m = mean(df$c)
ef = as.character(specify_decimal((t_m - c_m),1))

plot(x =df$x, y = df$t, type = "o", col = "#226fa5", pch = 19, ylim = c(5, 45), xlim = c(0,39), axes = F, 
     ylab = "Employment Rate (%)", xlab = x_lbl)
axis(side = 1, at = seq(1, 36, by = 5), labels =T)
axis(side = 2, at = seq(10, 42, by = 10), labels =T)

abline(h=t_m, col = "#226fa5")
lines(x =df$x, y = df$c, type = "o", col = "#75b74d", pch = 17)
abline(h=c_m, col = "#75b74d")
legend(15,13, lty = c(NA,1,NA,1), 
       col= c("#226fa5","#226fa5","#75b74d","#75b74d"),text.col = "black", 
       legend=c("Treatment", "Treatment Mean Over 9 Years", "Control", "Control Mean Over 9 Years"),
       pch = c(19,NA,17,NA))

arrows(x0 = c(35.7,35.7),y0= c(c_m,t_m), x1 = c(35.7,35.7), y1 = c(t_m,c_m), lwd=2)

text(x = 38,y= mean(c(t_m, c_m)), expression(tau == paste(6.2)))
../_images/9_surrogate_r_19_0.png

9.7.2. Figure 3: Estimates of Treatment Effect on Mean Employment Rates Over Nine Years#

op <- par(mar=c(5, 6, 4, 2) + 0.1)
par(mfcol = c(2, 1))
plot(1,type="n", axes = F, xlab = x_lbl, ylab = "Estimated Treatment Effect on Mean \nEmployment Rate Over 9 Years (%)",
    main = "A. Varying Quarters of Data Used to Construct Surrogate Index\n", xlim=c(0,37), ylim= c(0,13))
axis(side = 1, at = seq(1, 37, by = 5), labels =T)
axis(side = 2, at = seq(0, 14, by = 2), labels =T)
abline(h= as.numeric(exp_reg$coefficients[2]*100), col = cl[2], lwd=2.0)

for (i in as.numeric(confint(exp_reg)[2,1:2]*100)){
    abline(h=i , col = cl[2], lty=2)
}

for (i in 1:36){
    sg = as.numeric(surrogate_index[[i]]$coefficients[2]*100)
    nv = as.numeric(y_reg2[[i]]$coefficients[2]*100)
    points(i,sg, pch=19, col = cl[2])
    points(i,nv, pch=17, col = cl[1])
}

legend(5, 4,
       col= c(cl[2], cl[1],cl[2] ),text.col = "black", 
       legend=c("Surrogate Index Estimate", "Naive Short-Run Estimate",
       "Actual Mean Treatment Effect Over 36 Quarters"),
       pch = c(19,17,NA), lty = c(NA,NA,1), lwd=c(1,1,2), cex=0.5)

# legend(5, 3,
#        col= c(cl[2], cl[1],cl[2] ),text.col = "black", 
#        legend=c("Surrogate Index Estimate", "Naive Short-Run Estimate",
#        "Actual Mean Treatment Effect Over 36 Quarters"),
#        pch = c(19,17,NA), lty = c(NA,NA,1), lwd=c(1,1,2))

plot(1,type="n", axes = F, xlab = x_lbl, ylab = "Estimated Treatment Effect on Mean \nEmployment Rate Over 9 Years (%)",
    main = "B. Using Employment Rate in a Single Quarter as a Surrogate\n", xlim=c(0,37), ylim= c(-1,9))
axis(side = 1, at = seq(1, 37, by = 5), labels =T)
axis(side = 2, at = seq(-2, 10, by = 2), labels =T)
abline(h= as.numeric(exp_reg$coefficients[2]*100), col = cl[2], lwd=2.0)

for (i in as.numeric(confint(exp_reg)[2,1:2]*100)){
    abline(h=i , col = cl[2], lty=2)
}

for (i in 1:36){
    ex = as.numeric(naive_index[[i]]$coefficients[2] * 100)
    points(i,ex, pch=19, col = cl[2])
}

legend(0.75, 1.25,
       col= c(cl[2],cl[2] ),text.col = "black", 
       legend=c("Surrogate Estimate Using Emp. Rate in Quarter x Only"
                , "Actual Mean Treatment Effect Over 36 Quarters"),
       pch = c(19,NA), lty = c(NA,1), lwd=c(1,1,2), cex=0.5, bg="transparent")

# legend(0.75, 1.25,
#        col= c(cl[2],cl[2] ),text.col = "black", 
#        legend=c("Surrogate Estimate Using Emp. Rate in Quarter x Only"
#                 , "Actual Mean Treatment Effect Over 36 Quarters"),
#        pch = c(19,NA), lty = c(NA,1), lwd=c(1,1,2), cex=0.75, bg="transparent")
../_images/9_surrogate_r_21_0.png

9.7.3. Figure 4 : Validation of Six-Quarter Surrogate Index: Estimates of Treatment Effects on Mean Employment Rates, Varying Outcome Horizon#

data = data.frame(dat)

for (i in 1:36) {
    data[,"emp_cm1"] = data[,"emp1"]
    if (i >1){
        data[,paste("emp_cm", i, sep="")] = data[,paste("emp", i, sep="")] + data[,paste("emp_cm", i-1, sep="")]
    }
}

for (i in 1:36) {
    data[,paste("emp_cm", i, sep="")] = data[,paste("emp_cm", i, sep="")] / i
}
surr_4 = list()
surr_4_ix = list()
exp_4 = list()

for (i in 6:36){
    surr_4[[i]] = lm(emp_eq(6,paste("emp_cm",i, sep="")), data = data_1)
    data[,"surr_4"] = predict(surr_4[[i]], newdata = data)
    surr_4[[i]] = lm(formula = "surr_4 ~ treatment", data = data)
                     
    exp_4[[i]] = lm(paste(paste("emp_cm",i, sep=""),"~ treatment"), data = data)
}

lw0 = 1
plot(x =1, y = 2, type = "n", col = "#226fa5", pch = 19, ylim = c(4, 15), xlim = c(6,37), axes = F,
    ylab = "Estimated Treatment Effect on Mean\nEmployment Rate to Quarter x (%)", xlab = x_lbl, xaxt = "n")
axis(side = 1, at = seq(6, 37, by = 5), labels =T)
axis(side = 2, at = seq(4, 17, by = 2), labels =T)

for (i in 6:36){
    sr = surr_4[[i]]$coefficients[2]*100
    sr_ci = confint(surr_4[[i]])[2,1:2]*100
    
    exp = exp_4[[i]]$coefficients[2]*100
    exp_ci = confint(exp_4[[i]])[2,1:2]*100
    
    points(c(i,i), y = sr_ci, type = "l", col = cl[2])
    points(c(i,i), y = exp_ci, type = "l", col = cl[1])
    points(i, y = exp, col = cl[1], pch = 17)
    points(i, y = sr, col = cl[2], pch = 19)
}
legend(6, 6,
       col= c("#75b74d", "#226fa5"),text.col = "black", 
       legend=c("Actual Experimental Estimate", "Six-Quarter Surrogate Index Estimate"),
       pch = c(17,19))
../_images/9_surrogate_r_24_0.png

9.7.4. Figure 5: Bounds on Mean Treatment Effect on Employment Rates Over Nine Years, Varying Number of Quarters Used to Construct Surrogate Index#

### Bias
va_r = 0.09500865

bias_01_emp_ar = c()
bias_05_emp_ar = c()

for (i in 1:36){
    r2_t = as.numeric(summary(y_reg[[i]])[8])
    r2_o = as.numeric(summary(bias[[i]])[8])
    bias_01_emp = (va_r * 0.01 * (1 - r2_t) * (1 - r2_o) / va_r) ** (1 / 2) * 100
    bias_05_emp = (va_r * 0.05 * (1 - r2_t) * (1 - r2_o) / va_r) ** (1 / 2) * 100
    bias_01_emp_ar[i] = bias_01_emp
    bias_05_emp_ar[i] = bias_05_emp
}

s_inx = c()
for (i in 1: 36) {
    sg = as.numeric(surrogate_index[[i]]$coefficients[2])*100
    s_inx[i] = sg
}
u1 = s_inx + bias_01_emp_ar
l1 = s_inx - bias_01_emp_ar
u5 = s_inx + bias_05_emp_ar
l5 = s_inx - bias_05_emp_ar
x_q = 1:36
Warning message in summary.lm(y_reg[[i]]):
“essentially perfect fit: summary may be unreliable”
# plot(x_q, s_inx, pch = 19, col = cl[2], xaxt = "n", ylim = c(-20,25),
#     xlab = x_lbl, ylab = "Estimated Treatment Effect on Mean\nEmployment Rate Over 9 Years (%")
op <- par(mar=c(5, 6, 4, 2) + 0.1)
plot(x_q, s_inx, pch = 19, col = cl[2], xaxt = "n", ylim = c(-20,25), axes = F,
     xlab = x_lbl, ylab = "Estimated Treatment Effect on Mean\nEmployment Rate Over 9 Years (%)")

abline(h=mean(s_inx), col = "#2b8777")
abline(h=0, col = "black", lwd=2.0)
axis(side = 1, at = seq(1, 37, by = 5), labels =T)
axis(side = 2, at = seq(-20, 41, by = 10), labels =T)
lines(x_q, u1, col ="#404142")
lines(x_q, l1, col ="#404142")
lines(x_q, u5, col ="#a0afba")
lines(x_q, l5, col ="#a0afba")
a = col2rgb("#404142")/255
b = col2rgb("#a0afba")/255
polygon(c(x_q, rev(x_q)), c(u1, rev(l1)),
     col=rgb(a[1],a[2],a[3], alpha = 0.3), border = NA)
polygon(c(x_q, rev(x_q)), c(u5, rev(l5)),
     col=rgb(b[1],b[2],b[3], alpha = 0.2), border = NA)
legend(12, -7,
       col= c("#2b8777", cl[2], rgb(a[1],a[2],a[3], alpha = 0.3), rgb(b[1],b[2],b[3], alpha = 0.2)),text.col = "black", 
       legend=c("Actual Mean Treat Eff. Over 36 Quart.", "Surrogate Index Estimate",
               expression(paste("Bounds on Bias: ",R*""[y]^2, "|W = 1%")),
               expression(paste("Bounds on Bias: ",R*""[y]^2, "|W = 5%"))),
       pch = c(NA,19,NA,NA), lty = c(1,NA,1,1), lwd=c(1,1,10,10))
par(op)
../_images/9_surrogate_r_27_0.png