Chapter 8

Code Call-out 8.1: Quantile Effects with an Exogenous Treatment

In this code call-out we will work with results and data discussed in Firpo (2007), which require us to return once again to the LaLonde (1986) data we have discussed at length in Chapter 3. However, here rather than focussing on average treatment effects on the treated, we will focus on a range of quantile treatment effects (QTEs) and quantile treatment effects on the treated (QTTs).

Estimating QTEs with Experimental Interventions

We will begin by exploring QTEs when treatment assignment is random, and does not require the incorporation of any controls. In these cases, at least for the estimates themselves, it is sufficient to simply directly calculate quantiles of the outcome among the treated and control units to arrive to QTEs. Let’s first load these data, and ensure that we know which our outcome and treatment variables are:

clear all
set more off

// Load dataset
use "data/Dehejia_Wahba_2002.dta", clear

// data structure
describe
summarize re78 treat
tabulate treat

summarize re78 if treat == 1
summarize re78 if treat == 0
summarize re78 if treat == 0 & data_id == "Dehejia-Wahba Sample"

keep if data_id == "Dehejia-Wahba Sample"

Contains data from data/Dehejia_Wahba_2002.dta
 Observations:        16,437                  
    Variables:            11                  21 May 2024 20:52
-------------------------------------------------------------------------------
Variable      Storage   Display    Value
    name         type    format    label      Variable label
-------------------------------------------------------------------------------
data_id         str20   %20s                  
treat           float   %9.0g                 
age             float   %9.0g                 
education       float   %9.0g                 
black           float   %9.0g                 
hispanic        float   %9.0g                 
married         float   %9.0g                 
nodegree        float   %9.0g                 
re74            float   %9.0g                 
re75            float   %9.0g                 
re78            float   %9.0g                 
-------------------------------------------------------------------------------
Sorted by: 

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        re78 |     16,437    14588.22    9702.608          0   60307.93
       treat |     16,437    .0112551    .1054945          0          1

      treat |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     16,252       98.87       98.87
          1 |        185        1.13      100.00
------------+-----------------------------------
      Total |     16,437      100.00

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        re78 |        185    6349.144    7867.402          0   60307.93

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        re78 |     16,252    14682.01    9681.421          0   39483.53

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        re78 |        260    4554.801    5483.836          0   39483.53
(15,992 observations deleted)

Above we have kep the data corresponding to the “Dehejia-Wahba Sample” which is the original 445 treatment and control observations in the experimental implementation discussed in Dehejia and Wahba (1999). We can also exmaine the density of outcomes for both treatment and control units below:

// Kernel density plot to visualize distribution
twoway kdensity re78 if treat == 1, lcolor(blue) lwidth(thick) ///
  ||   kdensity re78 if treat == 0, lcolor(red) lwidth(thick) ///
       legend(label(1 "Treated") label(2 "Control")) ///

Examining densities of treatment and control

With these experimental data, let’s calculate some QTE. In particular, let’s calculate the quantity \(\tau_{QTE(0.8)}\), which is the effect at quantile 80. We can do this simply by calculating the quantiles in each group:

// Compute the 80th percentile for the treated group
_pctile re78 if treat == 1, p(80)
scalar q80_treated = r(r1)

// Compute the 80th percentile for the control group
_pctile re78 if treat == 0, p(80)
scalar q80_control = r(r1)

// Compute the Quantile Treatment Effect at the 80th percentile
display "QTE(0.8) = " q80_treated - q80_control
QTE(0.8) = 2265.4307

Of course, we are not limited to doing this at the 80th quantile. We can examine QTEs at multiple points of the distribution, below examining quantiles 25, 50 and 75 (and comparing these to ATEs themselves):

_pctile re78 if treat==1, p(25, 50, 75)
local FY1_25 = r(r1)
local FY1_50 = r(r2)
local FY1_75 = r(r3)

_pctile re78 if treat==0, p(25, 50, 75)
local FY0_25 = r(r1)
local FY0_50 = r(r2)
local FY0_75 = r(r3)

foreach q of numlist 25 50 75 {
    display "QTE at quantile `q' = " `FY1_`q''-`FY0_`q''
}

// Mean calculation
summarize re78 if treat == 1
scalar mean_treated = r(mean)

summarize re78 if treat == 0
scalar mean_control = r(mean)

dis "ATE is: " mean_treated - mean_control
QTE at quantile 25 = 485.2298
QTE at quantile 50 = 1093.5135
QTE at quantile 75 = 2350.553

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        re78 |        185    6349.144    7867.402          0   60307.93

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        re78 |        260    4554.801    5483.836          0   39483.53
ATE is: 1794.3424

If we inspect these QTEs and compare them to the values reported in the Supplementary Table II of Firpo (2007), we can see that they are very similar, with some marginal differences at certain quantiles likely owing to differences in manners of estimating quantiles (there are a number of ways to estimate quantiles, including different way with dealing with ties, interpolations, and so forth). We can go also further, and inspect effects across the entire distribution, which we do below at each centile:

gen FY1      = .
gen FY0      = .
gen quantile = .
// Generate empirical CDFs for each group
forvalues q=1/99 {
    qui centile re78 if treat == 1, centile(`q')
    qui replace FY1 = r(c_1) in `q'
    qui centile re78 if treat == 0, centile(`q')
    qui replace FY0 = r(c_1) in `q'
    qui replace quantile = `q' in `q'
}
gen diff = FY1-FY0

// Plot both distributions
twoway line quantile FY1, lcolor(blue) lpattern(solid) lwidth(thick) ///
    || line quantile FY0, lcolor(red) lpattern(dash) lwidth(thick) ///
    legend(label(1 "Treated") label(2 "Control"))
(445 missing values generated)
(445 missing values generated)
(445 missing values generated)
(346 missing values generated)

Empirical CDFs of 1978 Earnings by Treatment Status
// Plot QTEs
twoway line diff quantile, lpattern(solid) lwidth(thick) ///
ytitle("QTE") xtitle("Quantile")

QTEs Across the Distribution

Typically, inference on quantile treatment effects will proceed using a bootstrap. However, we can also estimate these quantile treatment effects (along with standard errors) using quantile regression in this case with unconditional unconfoundedness. It is important to note, however, that we may see minor differences between quantile regression and quantile treatment effects as calculated “by hand” above depending on the way that percentiles are calculated. We can see this below where we estimate a simple quantile regression at the 80th percentile:

qreg re78 treat, quantile(0.8)

Iteration 1:  WLS sum of weighted deviations =  1013093.5

Iteration 1:  Sum of abs. weighted deviations =    1012333
note: alternate solutions exist.
Iteration 2:  Sum of abs. weighted deviations =  949189.72
Iteration 3:  Sum of abs. weighted deviations =   891414.9

.8 Quantile regression                              Number of obs =        445
  Raw sum of deviations 899524.2 (about 9737.1543)
  Min sum of deviations 891414.9                    Pseudo R2     =     0.0090

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   2335.045   1024.958     2.28   0.023     320.6601     4349.43
       _cons |   8469.275    660.864    12.82   0.000     7170.457    9768.093
------------------------------------------------------------------------------

Here, while similar, this value of 2336 is different to the unconditional QTE of 2258 reported above. However, if we dig and explore this particular case, we can see that this simply owes to the fact that in our control group, there is an even number of units, and the 80th percentile happens to fall between two units, and in these cases Stata’s _pctile command will interpolate, while regression will not. We can confirm to ourselves that there is indeed equivalence between these two settings provided that quantiles are smooth if we simply remove one observation so that percentiles in each group now fall precisely on a specific unit for the values below:

sort treat re78
//drop one unit (with re78=0)
drop in 1
foreach p of numlist 25 50 70 {
    //First, calculate quantile regression:
    qreg re78 treat, quantile(`p')

    // Now calculate percentiles
    _pctile re78 if treat == 1, p(`p')
    local F1 = r(r1) 
    _pctile re78 if treat == 0, p(`p')
    local F0 = r(r1) 
    dis "treat: `F1', control: `F0'"
    dis "effect: " `F1'-`F0'
}
(1 observation deleted)

Iteration 1:  WLS sum of weighted deviations =  910097.87

Iteration 1:  Sum of abs. weighted deviations =  920581.78
Iteration 2:  Sum of abs. weighted deviations =  751630.18
Iteration 3:  Sum of abs. weighted deviations =  589298.86

.25 Quantile regression                             Number of obs =        444
  Raw sum of deviations   589710 (about 0)
  Min sum of deviations 589298.9                    Pseudo R2     =     0.0007

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   485.2298    133.764     3.63   0.000     222.3373    748.1223
       _cons |          0   86.34429     0.00   1.000    -169.6964    169.6964
------------------------------------------------------------------------------
treat: 485.2297973632813, control: 0
effect: 485.2298

Iteration 1:  WLS sum of weighted deviations =  1048390.8

Iteration 1:  Sum of abs. weighted deviations =    1047006
Iteration 2:  Sum of abs. weighted deviations =  1036679.8
Iteration 3:  Sum of abs. weighted deviations =  1021809.1

Median regression                                   Number of obs =        444
  Raw sum of deviations  1025648 (about 3701.812)
  Min sum of deviations  1021809                    Pseudo R2     =     0.0037

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   1038.299   907.3394     1.14   0.253    -744.9364    2821.535
       _cons |    3194.01   585.6851     5.45   0.000     2042.936    4345.084
------------------------------------------------------------------------------
treat: 4232.30908203125, control: 3194.010009765625
effect: 1038.2991

Iteration 1:  WLS sum of weighted deviations =  1048063.1

Iteration 1:  Sum of abs. weighted deviations =  1049988.8
Iteration 2:  Sum of abs. weighted deviations =  1035524.3
Iteration 3:  Sum of abs. weighted deviations =  1021488.9

.7 Quantile regression                              Number of obs =        444
  Raw sum of deviations  1030889 (about 7176.187)
  Min sum of deviations  1021489                    Pseudo R2     =     0.0091

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   1795.188   906.4308     1.98   0.048     13.73821    3576.638
       _cons |    6378.72   585.0986    10.90   0.000     5228.799    7528.641
------------------------------------------------------------------------------
treat: 8173.908203125, control: 6378.72021484375
effect: 1795.188

In this case, we see that both the QTEs, as well as the means among treated and control units are equivalent to the quantile-regression based calculation.

Estimating QTEs and QTTs with non-Experimental Interventions

If, rather than believing that unconditional unconfoundedness hold, we instead believe that conditional unconfoundedness is the appropriate assumption, there are two potential ways forward. To look at this, we will use the same LaLonde (1986) data, but now with the experimental treatment sample, and the non-experimental subsample as potential control units. We will control for the same factors we have discussed in code call-outs in Chapter 3. Let’s begin by loading the requisite data, which is the observational (CPS) subsample, along with treated units, and generating a number of required covariates:

use "data/Dehejia_Wahba_2002.dta", clear
keep if data_id=="CPS1"|treat==1

gen age2    = age*age
gen age3    = age*age*age
gen educ2   = education*education
gen u74     = (re74==0)
gen u75     = (re75==0)
gen edure74 = education*re74

local xvars age age2 age3 education educ2 black hisp marr re74 re75 u74 u75 edure74
(260 observations deleted)

Conditional QTEs

Let’s start by examining how we estimate QTEs in this observational setting. A first, simpler, case exists if we are happy to report conditional QTEs. We discuss the potential drawbacks of such QTEs in the book, but for now we can just note that if we are happy to report such conditional QTEs and invoke the required assumptions discussed in Section 8.2.2.1, we can do this very simply, by just estimating a quantile regression with covariates. We do this below (with an identical group of covariates to those used in code call out 3.1), reporting conditional quantile effects at the 25th, 50th, 75th, and 80th quantiles:

// Estimate CQTEs at selected quantiles (10th, 25th, 50th, 75th, 80th)
sqreg re78 treat `xvars', quantile(0.25 0.5 0.75 0.8) reps(100)
(fitting base model)

Bootstrap replications (100): .........10.........20.........30.........40.....
> ...x50.........60.........70.........80.........90.....x...100 done
..x: Error occurred when sqreg executed qreg.

Simultaneous quantile regression                    Number of obs =     16,177
  bootstrap(100) SEs                                .25 Pseudo R2 =     0.3691
                                                    .50 Pseudo R2 =     0.4528
                                                    .75 Pseudo R2 =     0.3221
                                                    .80 Pseudo R2 =     0.2565

------------------------------------------------------------------------------
             |              Bootstrap
        re78 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
q25          |
       treat |   336.9689    245.288     1.37   0.170    -143.8229    817.7606
         age |  -1095.423   105.9894   -10.34   0.000    -1303.174   -887.6718
        age2 |   29.45193   3.117657     9.45   0.000     23.34098    35.56289
        age3 |  -.2604614   .0305997    -8.51   0.000    -.3204401   -.2004826
   education |  -6.597792   51.09364    -0.13   0.897     -106.747     93.5514
       educ2 |   .3821435   1.835205     0.21   0.835    -3.215062    3.979349
       black |  -288.1883   173.6707    -1.66   0.097     -628.602    52.22549
    hispanic |  -278.9514   249.4559    -1.12   0.263    -767.9126    210.0098
     married |   150.5629   96.16523     1.57   0.117     -37.9316    339.0574
        re74 |   .2019322   .0343472     5.88   0.000     .1346079    .2692565
        re75 |   .7253549   .0326367    22.23   0.000     .6613833    .7893264
         u74 |   1143.295   145.7469     7.84   0.000     857.6153    1428.975
         u75 |   802.6436   156.6466     5.12   0.000      495.599    1109.688
     edure74 |   .0084538   .0010576     7.99   0.000     .0063808    .0105269
       _cons |   11316.04   1089.222    10.39   0.000     9181.046    13451.04
-------------+----------------------------------------------------------------
q50          |
       treat |   691.3541   455.2675     1.52   0.129    -201.0206    1583.729
         age |  -1312.078   76.52051   -17.15   0.000    -1462.066   -1162.089
        age2 |   31.10551   1.916735    16.23   0.000      27.3485    34.86252
        age3 |  -.2430046   .0158993   -15.28   0.000     -.274169   -.2118402
   education |    125.675    40.3619     3.11   0.002     46.56119    204.7888
       educ2 |  -.4039044   .9996815    -0.40   0.686    -2.363391    1.555582
       black |  -174.0431   99.17936    -1.75   0.079    -368.4456    20.35944
    hispanic |  -21.65099   65.80968    -0.33   0.742    -150.6453    107.3433
     married |   51.21724   39.14048     1.31   0.191    -25.50243    127.9369
        re74 |   .3391104   .0319198    10.62   0.000     .2765442    .4016767
        re75 |   .6362179    .027872    22.83   0.000     .5815856    .6908502
         u74 |   23.90396    170.859     0.14   0.889    -310.9985    358.8065
         u75 |  -2110.508   236.9428    -8.91   0.000    -2574.942   -1646.073
     edure74 |  -.0044533   .0015537    -2.87   0.004    -.0074987    -.001408
       _cons |   18840.39    922.679    20.42   0.000     17031.83    20648.94
-------------+----------------------------------------------------------------
q75          |
       treat |   3188.162    1158.73     2.75   0.006     916.9225    5459.402
         age |  -735.4121   134.3713    -5.47   0.000    -998.7947   -472.0295
        age2 |       14.5   3.452297     4.20   0.000     7.733114    21.26688
        age3 |  -.0968511   .0289067    -3.35   0.001    -.1535115   -.0401908
   education |   262.4513   85.31173     3.08   0.002     95.23082    429.6717
       educ2 |   19.45432   3.255783     5.98   0.000     13.07262    25.83601
       black |  -352.2737   147.0481    -2.40   0.017    -640.5044   -64.04308
    hispanic |   132.2775   155.9716     0.85   0.396     -173.444     437.999
     married |   350.2508   80.25779     4.36   0.000     192.9367     507.565
        re74 |   .6531498   .0413199    15.81   0.000     .5721583    .7341414
        re75 |   .3569383   .0185241    19.27   0.000     .3206291    .3932475
         u74 |  -1204.555   369.8512    -3.26   0.001    -1929.504   -479.6052
         u75 |  -4539.453   487.2458    -9.32   0.000    -5494.509   -3584.398
     edure74 |  -.0318235   .0026321   -12.09   0.000    -.0369827   -.0266642
       _cons |   15936.35   1787.913     8.91   0.000     12431.84    19440.85
-------------+----------------------------------------------------------------
q80          |
       treat |   3558.448   1133.074     3.14   0.002     1337.496      5779.4
         age |   -440.533   152.4928    -2.89   0.004    -739.4358   -141.6302
        age2 |   7.922832   3.903379     2.03   0.042     .2717767    15.57389
        age3 |  -.0492251   .0327353    -1.50   0.133      -.11339    .0149398
   education |   427.8744   83.23667     5.14   0.000     264.7213    591.0275
       educ2 |   18.80605    3.63804     5.17   0.000     11.67509    25.93701
       black |  -468.6949   135.4654    -3.46   0.001    -734.2221   -203.1676
    hispanic |   221.2713   159.2183     1.39   0.165    -90.81418    533.3568
     married |   391.4331   100.4825     3.90   0.000     194.4763    588.3899
        re74 |   .7139457   .0391586    18.23   0.000     .6371904    .7907009
        re75 |   .2862254   .0147301    19.43   0.000     .2573528     .315098
         u74 |  -1486.878   394.8738    -3.77   0.000    -2260.874   -712.8815
         u75 |  -4378.361   437.6558   -10.00   0.000    -5236.215   -3520.507
     edure74 |  -.0390657   .0027018   -14.46   0.000    -.0443616   -.0337698
       _cons |   12357.81   2012.556     6.14   0.000     8412.974    16302.64
------------------------------------------------------------------------------

The above covariate structure is slightly different to that described in the Supplementary Materials of Firpo (2007), but is useful in providing an identical comparison to previous covariate specifications. We can also examine this over the entire distribution of (conditional) quantiles. Below we loop through quantiles 20-95 (ie quantiles where we observed non-zero salaries in the experimental case). We do this as a simple loop, in each iteration saving the estimated quantile treatment effect.

* Create a new frame 
frame create qte_cond
frame change qte_cond
set obs 76  // Set number of observations to match quantiles

gen quantile = (_n+19)/100

gen qte = .
gen qte_se = .

* Estimate QTEs across quantiles 
frame change default

local i = 1
forvalues q=20/95 {
    qui qreg re78 treat `xvars', quantile(0.`q')

    frame change qte_cond
    qui replace qte = _b[treat]     in `i'
    qui replace qte_se = _se[treat] in `i'
    frame change default

    local ++i
}
Number of observations (_N) was 0, now 76.
(76 missing values generated)
(76 missing values generated)

Finally, we can plot the resulting distribution of quantile treatment effects. We do this below, and note that we see a reasonable correspondence with the experimentally estimated QTEs laid out previously, however with some important differences particularly at the upper end of the distribution.

frame change qte_cond
// Compute confidence intervals
gen qte_upper = qte + invnormal(0.975) * qte_se
gen qte_lower = qte + invnormal(0.025) * qte_se

// Plot CQTE results
twoway (line qte quantile, lwidth(medium) lcolor(black)) ///
       (line qte_upper quantile, lpattern(dash) lcolor(black)) ///
       (line qte_lower quantile, lpattern(dash) lcolor(black)), ///
       title("Conditional Quantile Treatment Effects") ///
       xtitle("Quantile") ///
       ytitle("Earnings in 1978 (in thousands)") ///
       legend(order(1 "QTT" 2 "95% CI") ring(0) position(6)) ///
       xlabel(0.2(.1)1, format("%03.1f")) 

frame change default

Conditional Quantile Treatment Effects

This can also be estimated using the user-written ivqte package of Frölich and Melly (2010), which similarly permits for heteroscedastic standard errors, and various other useful extensions. We will not examine this in great depth here, but can easily see the equivalence below, where we note the comparison of the point estimate at three specific points to those estimated in the original call to quantile regression above.

//NOTE: Requires a number of user-written programmes
//net install ivqte, from("https://raw.githubusercontent.com/bmelly/Stata/main/")
//ssc install moremata
//ssc install kdens

ivqte re78 `xvars' (treat), quantiles(0.25) variance

ivqte re78 `xvars' (treat), quantiles(0.50) variance

ivqte re78 `xvars' (treat), quantiles(0.75) variance

Quantile regression
Estimator suggested in Koenker and Bassett (1978)

Quantile:                    .25
Dependent variable:          re78
Regressor(s):                treat age age2 age3 education educ2 black hispanic
>  married re74 re75 u74 u75 edure74
Number of observations:      16177


------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   336.9689   296.0183     1.14   0.255    -243.2163    917.1541
         age |  -1095.423   131.5978    -8.32   0.000     -1353.35   -837.4958
        age2 |   29.45193   3.803928     7.74   0.000     21.99637     36.9075
        age3 |  -.2604614   .0354201    -7.35   0.000    -.3298835   -.1910392
   education |  -6.597792   60.02031    -0.11   0.912    -124.2354    111.0399
       educ2 |   .3821435   2.554831     0.15   0.881    -4.625234    5.389521
       black |  -288.1883   146.3746    -1.97   0.049    -575.0773   -1.299263
    hispanic |  -278.9514   202.3028    -1.38   0.168    -675.4575    117.5548
     married |   150.5629   106.2352     1.42   0.156    -57.65426    358.7801
        re74 |   .2019322   .0319087     6.33   0.000     .1393923     .264472
        re75 |   .7253549   .0289848    25.03   0.000     .6685457    .7821641
         u74 |   1143.295   138.1678     8.27   0.000     872.4915    1414.099
         u75 |   802.6436    147.692     5.43   0.000     513.1726    1092.115
     edure74 |   .0084538   .0012264     6.89   0.000     .0060501    .0108576
       _cons |   11316.04   1480.217     7.64   0.000     8414.871    14217.21
------------------------------------------------------------------------------

Quantile regression
Estimator suggested in Koenker and Bassett (1978)

Quantile:                    .5
Dependent variable:          re78
Regressor(s):                treat age age2 age3 education educ2 black hispanic
>  married re74 re75 u74 u75 edure74
Number of observations:      16177


------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   691.3541   455.1657     1.52   0.129    -200.7543    1583.462
         age |  -1312.078   115.5608   -11.35   0.000    -1538.572   -1085.583
        age2 |   31.10551   3.125206     9.95   0.000     24.98022     37.2308
        age3 |  -.2430046   .0273823    -8.87   0.000     -.296673   -.1893363
   education |    125.675    50.4872     2.49   0.013     26.72189    224.6281
       educ2 |  -.4039044   2.084644    -0.19   0.846    -4.489732    3.681923
       black |  -174.0431    119.079    -1.46   0.144    -407.4336     59.3474
    hispanic |  -21.65099   138.5275    -0.16   0.876      -293.16     249.858
     married |   51.21724    90.7017     0.56   0.572    -126.5548    228.9893
        re74 |   .3391104    .027422    12.37   0.000     .2853642    .3928566
        re75 |   .6362179   .0250267    25.42   0.000     .5871664    .6852694
         u74 |   23.90396   200.9098     0.12   0.905    -369.8719    417.6799
         u75 |  -2110.508   251.6371    -8.39   0.000    -2603.707   -1617.308
     edure74 |  -.0044533    .001035    -4.30   0.000    -.0064818   -.0024249
       _cons |   18840.39   1357.542    13.88   0.000     16179.65    21501.12
------------------------------------------------------------------------------

Quantile regression
Estimator suggested in Koenker and Bassett (1978)

Quantile:                    .75
Dependent variable:          re78
Regressor(s):                treat age age2 age3 education educ2 black hispanic
>  married re74 re75 u74 u75 edure74
Number of observations:      16177


------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       treat |   3188.162   1195.754     2.67   0.008     844.5282    5531.796
         age |  -735.4121   157.6006    -4.67   0.000    -1044.304   -426.5206
        age2 |       14.5   4.226071     3.43   0.001      6.21705    22.78295
        age3 |  -.0968511   .0368622    -2.63   0.009    -.1690997   -.0246026
   education |   262.4513   80.88522     3.24   0.001     103.9191    420.9834
       educ2 |   19.45432   3.432125     5.67   0.000     12.72748    26.18116
       black |  -352.2737   181.4474    -1.94   0.052    -707.9042    3.356701
    hispanic |   132.2775   178.1151     0.74   0.458    -216.8217    481.3767
     married |   350.7351   119.7038     2.93   0.003       116.12    585.3502
        re74 |   .6531498    .038541    16.95   0.000     .5776108    .7286889
        re75 |   .3569383   .0196095    18.20   0.000     .3185044    .3953723
         u74 |   -1204.07   397.5809    -3.03   0.002    -1983.315    -424.826
         u75 |  -4539.453   449.9045   -10.09   0.000     -5421.25   -3657.657
     edure74 |  -.0318235   .0024935   -12.76   0.000    -.0367106   -.0269363
       _cons |   15935.86   2016.618     7.90   0.000     11983.36    19888.36
------------------------------------------------------------------------------

Unconditional QTEs

While the previously implemented methods allow for the calculation of conditional quantile effects, we can use these tools, and in particular the ivqte package, to calculate unconditional QTEs. Below, we implement Firpo (2007)’s methods which implements these weighting-based estimators, along with their standard errors.

We will do this with the same covariate set, noting that this simply requires for the same ivqte command to be invoked as above, but now covariates should be passed as arguments in continuous and dummy, and ivqte will infer that Firpo (2007)’s reweighting method should be used.

* Conditional
ivqte re78 (treat), quantiles(0.25 0.5 0.75 0.8) continuous(age age2 age3 education educ2 re74 re75  edure74) dummy(black hisp marr u74 u75) variance

// Refer to Firpo (2007) Econometrica paper.  In particular, supplement is important
//https://www.econometricsociety.org/publications/econometrica/2007/01/01/efficient-semiparametric-estimation-quantile-treatment-effects/supp/ECTA5407SUPP_0.pdf
12032 observations have been trimmed. 4145 observations are left after trimming
> .

Unconditional Quantile Treatment Effects under exogeneity
Estimator suggested in Firpo (2007)

Quantile(s):                 .25 .5 .75 .8
Dependent variable:          re78
Treatment variable:          treat
Control variable(s):         age age2 age3 education educ2 re74 re75 edure74 bl
> ack hispanic married u74 u75 
Number of observations:      16177

Propensity score estimated by local logit regression with h = infinity and lamb
> da = 1
Variance estimated using local logit regression with h = infinity and lambda = 
> 1

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  Quantile_1 |   4004.615   862.1704     4.64   0.000     2314.792    5694.438
  Quantile_2 |  -1367.273   1117.262    -1.22   0.221    -3557.066    822.5198
  Quantile_3 |   -3633.77   2811.192    -1.29   0.196    -9143.605    1876.066
  Quantile_4 |   -2863.53   1358.438    -2.11   0.035    -5526.019   -201.0415
------------------------------------------------------------------------------

In this case, we see that the estimator performs quite poorly, suggesting that the conditional unconfoundedness assumption is likely unreasonable when considering all observations. In practice, this procedure trims very high and very low propensity scores, and we can see that if we do not trim such propensity scores, we observe estimates which are even further from their experimental counterparts:

ivqte re78 (treat), quantiles(0.25 0.5 0.75 0.8) continuous(age age2 age3 education educ2 re74 re75  edure74) dummy(black hisp marr u74 u75) trim(0) variance

Unconditional Quantile Treatment Effects under exogeneity
Estimator suggested in Firpo (2007)

Quantile(s):                 .25 .5 .75 .8
Dependent variable:          re78
Treatment variable:          treat
Control variable(s):         age age2 age3 education educ2 re74 re75 edure74 bl
> ack hispanic married u74 u75 
Number of observations:      16177

Propensity score estimated by local logit regression with h = infinity and lamb
> da = 1
Variance estimated using local logit regression with h = infinity and lambda = 
> 1

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  Quantile_1 |  -764.0093   22257.19    -0.03   0.973    -44387.29    42859.27
  Quantile_2 |  -10765.62   24978.67    -0.43   0.666    -59722.91    38191.67
  Quantile_3 |  -15471.84   61339.12    -0.25   0.801    -135694.3    104750.6
  Quantile_4 |  -15634.62   73404.76    -0.21   0.831    -159505.3    128236.1
------------------------------------------------------------------------------

However, when using more judicious trimming, we observe estimates which are at least broadly positive, though still quite different to those documented in the experimental sample.

ivqte re78 (treat), quantiles(0.25 0.5 0.75 0.8) continuous(age age2 age3 education educ2 re74 re75  edure74) dummy(black hisp marr u74 u75) trim(0.05) variance
15606 observations have been trimmed. 571 observations are left after trimming.

Unconditional Quantile Treatment Effects under exogeneity
Estimator suggested in Firpo (2007)

Quantile(s):                 .25 .5 .75 .8
Dependent variable:          re78
Treatment variable:          treat
Control variable(s):         age age2 age3 education educ2 re74 re75 edure74 bl
> ack hispanic married u74 u75 
Number of observations:      16177

Propensity score estimated by local logit regression with h = infinity and lamb
> da = 1
Variance estimated using local logit regression with h = infinity and lambda = 
> 1

------------------------------------------------------------------------------
        re78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  Quantile_1 |   647.2046   681.2541     0.95   0.342    -688.0288    1982.438
  Quantile_2 |   1862.038   1265.753     1.47   0.141    -618.7914    4342.868
  Quantile_3 |   727.5698   1622.613     0.45   0.654    -2452.694    3907.834
  Quantile_4 |   -151.749   1892.948    -0.08   0.936    -3861.859    3558.361
------------------------------------------------------------------------------

Firpo (2007) documents results which are more broadly similar to those in the experimental sub-sample when using a much richer specification for the propensity score. In general, this points to the importance of appropriately modelling the propensity score, and the nature of the conditional confoundedness assumption, as discussed in general with methods based on conditional unconfoundedness in Chapter 3 of the book.

Code Call-out 8.2: Extrapolating Regression Discontinuity Parameters Away from the Cut-off

Londoño-Vélez, Rodríguez, and Fabio Sánchez (2020) study the impact of receiving financial aid for post-secondary education on rates of enrollment among low-income individuals in Colombia. Specifically, they take advantage of program eligibility rules based on cut-off scores in a wealth index to isolate effects of financial aid eligibility. These cut-off scores in the wealth index imply that for individuals whose family wealth index is below a specific explicitly designed score, they are eligible to receive financial aid provided that they meet test score requirements. However, comparable individuals with scores in the wealth index even marginally above this cut-off, are not eligible to receive financial aid.

While this suggests a standard regression discontinuity design, one novelty of these wealth cut-off scores is that they are not fixed nation-wide, but rather vary by location. For individuals living in rural areas, individuals with a score below 40.75 are eligible for financial aid, while in large metropolitan areas, this score is 57.21 (refer to Londoño-Vélez, Rodríguez, and Fabio Sánchez (2020), page 201 for full details). This suggests that we can extrapolate findings away from specific cut-offs to consider the generalisability of any treatment effect local to specific cut-off scores, following Cattaneo et al. (2021).

Confirming Discontinuities in Treatment Eligility

To see the broad context of the study, we will begin by confirming that there is a discontinuity in financial aid eligibility rates around the test score cut-off. We begin by opening the data from Londoño-Vélez, Rodríguez, and Fabio Sánchez (2020) and working with the sample they use in the paper. Specifically here, we will also impose the restriction eligible_saber11==1 which implies that all individuals in the sample meet educational criteria for financial aid, and so the only discontinuity which exists is that owing to the wealth eligibility criteria:

use data/LondonoVelez_et_al_2020, clear
keep if icfes_per==20142
keep if eligible_saber11==1
(573,662 observations deleted)
(520,637 observations deleted)

Now let’s visualise the discontinuity in eligibility in the entire sample. Here we will work with a re-centred running variable which for each individual defines their distance to the area-specific eligigility threshold which applied to them. In order to set up a simple visualisation we will use an arbitrary definition setting bins from 50 points below the threshold up to 50 points above the threshold, in increments of 2 points. For a discussion of optimal bins in this setting refer to the discussion in Chapter 6 of the book. Within each bin, we will generate average scores as bin, and will plot a single point for each average score. We will then overlay a linear fit on either side of the cut-off using the original data.

egen cut = cut(running_sisben), at(-50(2)50)
egen mean_include = tag(cut)
bysort cut: egen bin =  mean(beneficiary_spp)

local lineopts lcolor(red) fcolor(gs12%50) acolor(gs12%50) lwidth(medthick)

twoway lfitci beneficiary_spp running_sisben if abs(running_sisben)<50 & running_sisben < 0, sort `lineopts' ///
    || lfitci beneficiary_spp running_sisben if abs(running_sisben)<50 & running_sisben >= 0, sort `lineopts' ///
    || scatter bin cut if mean_include==1, mc(black) msize(medlarge) ms(Oh) ///
 legend(order(1 "95% CI" 2 "Linear fit" 5 "Averages") pos(6) rows(1)) ///
 ylabel(, format("%03.1f")) ytitle("SPP Beneficiaries")
(30,740 missing values generated)

Above we see clear evidence of a sharp increase in eligibility when individuals fall just below the cut-off point. While no one with an above cut-off score is found to be eligible, this immediately jumps to around 60% eligibility among those with a below cut-off score. In what remains of the code call out below we will focus on the impact of falling below this cut-off, rather than the eligibility criteria itself. In effect, we wil consider a sharp design rather than a fuzzy design, though note that discussion in Cattaneo et al. (2021) points to how we could generalise this for a fuzzy design.

Visualising Multiple Treatment Cut-offs

Before we consider the process of extrapolating across cut-offs, let’s begin by confirming that we do indeed see multiple cut-offs owing to the differential treatment thresholds. We do this below, using the sisben_area variable, which takes 1 for large metropolitan areas which have a cut-off of 57.21 points, and 3 for rural areas with a cut-off of 40.75 points. There is actually also a third group (other urban areas) which takes a value of 2 and has a cut-off of 56.32 points, but because this is very close to group 1, we will only focus on rural and metropolitan areas.

We will generate two graphs, simply seeking to confirm that we see a sharp cut-off for each group at the point where, theoretically, such a cut-off should appear. We will do this with the precise score on the wealth index (sisben_score).

//Low cut-off
egen cut_low = cut(sisben_score) if sisben_area==3, at(0(2)100)
egen mean_include_low = tag(cut_low)
bysort cut_low: egen bin_low =  mean(beneficiary_spp)

twoway lfitci beneficiary_spp sisben_score if sisben_score < 40.75 & sisben_area==3, sort ///
 || lfitci beneficiary_spp sisben_score if sisben_score >= 40.75   & sisben_area==3, sort ///
 || scatter bin_low cut_low if mean_include_low==1, mc(black) msize(small) saving(low, replace) ///
 legend(off) title("Rural") ytitle("SPP Beneficiary") ylabel(, format("%04.2f")) xline(40.75, lcolor(red))


egen cut_high = cut(sisben_score) if sisben_area==1, at(0(2)100)
egen mean_include_high = tag(cut_high)
bysort cut_high: egen bin_high =  mean(beneficiary_spp)

twoway lfitci beneficiary_spp sisben_score if sisben_score < 57.21 & sisben_area==1, sort ///
 || lfitci beneficiary_spp sisben_score if sisben_score >= 57.21 & sisben_area==1, sort ///
 || scatter bin_high cut_high if mean_include_high==1, mc(black) msize(small) saving(high, replace) ///
 legend(off) title("Metropolitan") ytitle("SPP Beneficiary") ylabel(, format("%04.2f")) xline(57.21, lcolor(red))

graph combine "low" "high"
(51,791 missing values generated)
file low.gph saved
(42,394 missing values generated)
file high.gph saved

These graphs above are really only used to show descriptive patters, as we have built bins in average of 2 points, and so the final bin on the right hand side will be slightly contaminated with above-threshold points, but we can correct this by generating different cut-points easily enough, and the graphs above make clear that there are clear discontinuities at the points which correspond to the specific wealth cut-off which binds for each group.

Let’s now consider some outcome of interest, and the extrapolation of treatment effects which we seek to achieve. In particular, let’s work with the variable spadies_any which indicates whether an individual studies any type of post-secondary education. And let’s visualise the mean outcome and a local polynomial fit of the outcomes for each group. Below we do this in a single graph. To do so we generate two variables which we can use to generate means (round1 and round3, which are centered on the cut-off), and which we arbitrarily set in terms of 2 point bins. We then use egen ... mean() to generate mean scores in each of these groups simultaneously, before plotting these means as well as local polynomial fits on each side. Note that we generate group means without collapsing so that we can generate local polynomial fits based on the original microdata, rather than collapsed means.

gen round1=floor(running_sisben/2) if sisben_area ==1
gen round3=floor(running_sisben/2) if sisben_area ==3

bys round1 round3 sisben_area: gen n=_n
bysort round1 round3 sisben_area: egen bin_group =  mean(spadies_any)

twoway scatter bin_group sisben_score if n==1&sisben_area ==1, ms(Oh) msize(medlarge) ///
 ||  scatter bin_group sisben_score if n==1&sisben_area ==3, ms(Sh) mcolor(red) msize(medlarge) ///
 || lpoly spadies_any sisben_score if sisben_area ==3&running_sisben<0, bwidth(10) lpattern(dash) lcolor(red) ///
 || lpoly spadies_any sisben_score if sisben_area ==3&running_sisben>=0, bwidth(10) lpattern(dash) lcolor(red) ///
 || lpoly spadies_any sisben_score if sisben_area ==1&running_sisben<0, bwidth(10) lpattern(longdash) lcolor(navy) ///
 || lpoly spadies_any sisben_score if sisben_area ==1&running_sisben>=0, bwidth(10) lpattern(longdash) lcolor(navy) lwidth(thick) ///
 legend(order(1 "High cut-off" 2 "Low cut-off" 3 "Fit (low)" 5 "Fit (high)") pos(6) rows(1)) ///
 xtitle("SISBEN wealth index") ytitle("Studying any tertiary education") ylabel(, format("%03.1f"))
(42,394 missing values generated)
(51,791 missing values generated)

In the above plot we can quite easily see the idea of what we wish to do when extrapolating treatment effects away from the cut-off. Specifically, we wish to consider the first cut-off, here at 40.75 points. We wish to calculate the treatment effect at this cut-off by comparing outcomes among exposed units just at the left to those just at the right in the spirit of an RDD. And then we wish to consider what the treatment effect would look like at specific points above 40.75 if we use the trend among units exposed at a higher cut-off point (those with blue circles) to extrapolate means in the below-cut-off group with red squares, before finally comparing extrapolated means with actual observed rates among those with red squares to the right of the treatment cut-off.

Extrapolating Treatment Effects Away from the Cut-off

In order to do such an extrapolation, we require a way to estimate local polynomial fits at various points (including at end-points just before treatment cut-offs), as well as the variance of these local polynomial estimates. Fortunately, in relation to the work of Cattaneo et al. (2021), the authors developed software for such local polynomial fits, incorporating elements such as robust bias correction. This is avaialable (in Stata and R) as nprobust and we will work with this package below to estimate the required quantities.

Let’s begin by imagining that we wish to extrapolate treatment effects from the true cut-off of 40.75 up a higher point on the SISBEN wealth index (50 points). To do so, we need four quantities. Firstly, we need to calculate the end point of the low-cut-off group precisely at 40.75 points (ie the point just before the discontinuity kicks in). Cattaneo et al. (2021) call this first quantity \(\mu_{0,\ell}(\ell)\) Secondly, we need to calculate the mean values in the high-cut-off group at both 40.75 and 50 points, which allows us to calcualte any trend over this range. Cattaneo et al. (2021) refer to these as \(\mu_{0,h}(\ell)\) and \(\mu_{0,h}(\bar{x})\) respectively. And finally, we wish to calculate the mean among low-cut-off group outcomes at 50 points, which Cattaneo et al. (2021) refer to as \(\mu_{1,\ell}(\bar{x})\). Once we have these points in hand, as discussed in Section 8.4.2.2 of the book, we can simply extrapolate our treatment effect as: \[ \widehat\tau_\ell(\bar{x})=\widehat\mu_{1,\ell}(\bar{x}) -[\widehat\mu_{0,h}(\bar{x})+\widehat\mu_{0,\ell}(\ell)-\widehat\mu_{0,h}(\ell)]. \]

Let’s do this below, using `lprobust’ to generate key quantities. We will also take the variance at each point, allowing us to calculate the standard error of the extrapolated treatment effect as the square root of the total variance. Note that because we are jointly estimating \(\mu_{0,h}(\ell)\) and \(\mu_{0,h}(\bar{x})\) and then wish to calculate the variance of \(\mu_{0,h}(\bar{x})-\mu_{0,h}(\ell)\), this is \(Var(\mu_{0,h}(\bar{x})-\mu_{0,h}(\ell))=Var(\mu_{0,h}(\bar{x})+Var(\mu_{0,h}(\ell))-2\times Cov(\mu_{0,h}(\bar{x}),\mu_{0,h}(\ell))\); see for example the calculation in the authors’ original materials here.

//net install nprobust, from(https://raw.githubusercontent.com/nppackages/nprobust/master/stata) replace
gen c0 = 40.75 in 1
lprobust spadies_any sisben_score if sisben_area==3&sisben_score < 40.75, eval(c0)
local mu_0_l_l = e(Result)[1,5]
local v_0_l_l = e(Result)[1,8]^2

gen c1 = 50 in 1
lprobust spadies_any sisben_score if sisben_area==3&sisben_score >= 40.75, eval(c1)
local mu_1_l_x = e(Result)[1,5]
local v_1_l_x = e(Result)[1,8]^2

generate c2 = 40.75 in 1
replace  c2 = 50    in 2
lprobust spadies_any sisben_score if sisben_area==1&sisben_score < 57.21, eval(c2) covgrid bwselect("mse-dpi")
local mu_0_h_l = e(Result)[1,5]
local mu_0_h_x = e(Result)[2,5]
local v_0_h_l  = e(Result)[1,8]^2
local v_0_h_x  = e(Result)[2,8]^2
local cov      = e(cov_rb)[2,1]

local effect = `mu_1_l_x'-(`mu_0_h_x'+`mu_0_l_l'-`mu_0_h_l')
dis "Effect at 50 is: `effect'"

local variance = `v_0_l_l'+`v_1_l_x'+`v_0_h_l'+`v_0_h_x'-2*`cov'
dis "Variance at 50 is: `variance'"
(53,631 missing values generated)

Local Polynomial Regression Estimation and Inference.

 Sample size                              (n=)               1434
 Polynomial order for point estimation    (p=)                  1
 Order of derivative estimated            (v=)                  0
 Polynomial order for confidence interval (q=)                  2
 Kernel function                                     Epanechnikov
 Bandwidth selection method                               mse-dpi

------------------------------------------------------------------------
                                     Point      Std.         Robust B.C.
          eval        bw   Eff.n      Est.     Error  95% Conf. Interval
------------------------------------------------------------------------
   1   40.7500    7.7952     300    0.6808    0.0658    0.4297    0.8341
------------------------------------------------------------------------
(53,631 missing values generated)

Local Polynomial Regression Estimation and Inference.

 Sample size                              (n=)                407
 Polynomial order for point estimation    (p=)                  1
 Order of derivative estimated            (v=)                  0
 Polynomial order for confidence interval (q=)                  2
 Kernel function                                     Epanechnikov
 Bandwidth selection method                               mse-dpi

------------------------------------------------------------------------
                                     Point      Std.         Robust B.C.
          eval        bw   Eff.n      Est.     Error  95% Conf. Interval
------------------------------------------------------------------------
   1   50.0000   10.4888     345    0.4382    0.0289    0.3524    0.5064
------------------------------------------------------------------------
(53,631 missing values generated)
(1 real change made)

Local Polynomial Regression Estimation and Inference.

 Sample size                              (n=)               7825
 Polynomial order for point estimation    (p=)                  1
 Order of derivative estimated            (v=)                  0
 Polynomial order for confidence interval (q=)                  2
 Kernel function                                     Epanechnikov
 Bandwidth selection method                               mse-dpi

------------------------------------------------------------------------
                                     Point      Std.         Robust B.C.
          eval        bw   Eff.n      Est.     Error  95% Conf. Interval
------------------------------------------------------------------------
   1   40.7500   15.2623    5602    0.7748    0.0064    0.7528    0.7886
   2   50.0000   14.0315    4504    0.7933    0.0065    0.7778    0.8117
------------------------------------------------------------------------
Effect at 50 is: -.261199592853647
Variance at 50 is: .0123096503514562

While this is a single extrapolation, we can of course extrapolate more widely up to any point below the second cut-off, at which point no untreated units remain. Below we conduct a similar process now extrapolating across a range of values. This simply replicates the code above, but incorporating a loop for various values \(\bar{x}\) used to extrapolate.

gen estimate  = .
gen std_error = .
gen runvar    = .

local j=0
foreach num of numlist 41(0.8)57.2 {
    qui lprobust spadies_any sisben_score if sisben_area==3&sisben_score < 40.75, eval(c0)
    local mu_0_l_l = e(Result)[1,5]
    local v_0_l_l = e(Result)[1,8]^2

    qui replace c1 = `num' in 1
    qui lprobust spadies_any sisben_score if sisben_area==3&sisben_score >= 40.75, eval(c1)
    local mu_1_l_x = e(Result)[1,5]
    local v_1_l_x = e(Result)[1,8]^2

    qui replace  c2 = `num' in 2
    qui lprobust spadies_any sisben_score if sisben_area==1&sisben_score < 57.21, eval(c2) covgrid bwselect("mse-dpi")
    local mu_0_h_l = e(Result)[1,5]
    local mu_0_h_x = e(Result)[2,5]
    local v_0_h_l  = e(Result)[1,8]^2
    local v_0_h_x  = e(Result)[2,8]^2
    local cov      = e(cov_rb)[2,1]

    local effect =  `mu_1_l_x'-(`mu_0_h_x'+`mu_0_l_l'-`mu_0_h_l')
    local variance = `v_0_l_l'+`v_1_l_x'+`v_0_h_l'+`v_0_h_x'-2*`cov'
    dis "Effect at `num' is: `effect'"

    local ++j
    qui replace estimate  = `effect'         in `j'
    qui replace std_error = sqrt(`variance') in `j'
    qui replace runvar    = `num'            in `j' 
}
gen LB = estimate+invnormal(0.025)*std_error
gen UB = estimate+invnormal(0.975)*std_error

twoway rarea LB UB runvar, color(gs8%30) ///
  || scatter estimate runvar, ///
legend(order(2 "Point estimate" 1 "95% CI") pos(6) rows(1)) ///
ytitle("Extrapolated ATT") xtitle("Running variable") ///
ylabel(, format("%03.1f")) yline(0, lcolor(black) lpattern(dash))
(53,632 missing values generated)
(53,632 missing values generated)
(53,632 missing values generated)
Effect at 41 is: -.2165728366967617
Effect at 41.8 is: -.2355804678739492
Effect at 42.6 is: -.2327253140024376
Effect at 43.4 is: -.2356306453445438
Effect at 44.2 is: -.2394886570703139
Effect at 45 is: -.2433238817470714
Effect at 45.8 is: -.2472504204172264
Effect at 46.6 is: -.2514352351699544
Effect at 47.4 is: -.2545309194582378
Effect at 48.2 is: -.2574228611298656
Effect at 49 is: -.2597445912904411
Effect at 49.8 is: -.2610087909266261
Effect at 50.6 is: -.2616887681774505
Effect at 51.4 is: -.2628093037510875
Effect at 52.2 is: -.263601753970882
Effect at 53 is: -.2630718754271456
Effect at 53.8 is: -.2619294058378561
Effect at 54.6 is: -.2618253959186195
Effect at 55.4 is: -.2621265134564078
Effect at 56.2 is: -.2625597252216138
Effect at 57 is: -.2575650610920494
(53,611 missing values generated)
(53,611 missing values generated)
Figure 1: Non-parametric fits with multiple cut-offs

We can see what the extrapolated effects look like across a range of values, presenting these estimates along with 95% confidence intervals. In this specific case we note that extrapolated effects are quite flat, which makes sense given that both relevant non-parametric fits (shown in Figure 1) in the relevant range between 40 and 57 are quite flat.

Code Call-out 8.3: Marginal Treatment Effects

In this code call-out we consider a number of elements related to the estimation of marginal treatment effects (MTEs). To do so, we work with data from Carneiro, Lokshin, and Umapathi (2017), who estimate the returns to upper secondary schooling in Indonesia and examine how those returns vary across individuals with different likelihoods of enrolling. This setting is well-suited to consider the MTE framework. If individuals sort into schooling partly based on their own anticipated returns, then the returns among those who enrol only when schooling is made more accessible (the compliers of any given instrument) may differ substantially from returns among those who would always enrol regardless. The MTE surface we consider here traces out exactly this variation.

Following Carneiro, Lokshin, and Umapathi (2017), data from the 2000 wave of the Indonesia Family Life Survey (IFLS) is used, restricted to men aged 25-60 who are employed and report non-missing wages and schooling, along with non-missing information on an instrument, key covariates used for calculating a propensity score. This yields a sample of 2,608 working-age males. We load these data below and subset to observations with non missing observations, examining summary statistics for log earnings, the key outcome in the estimation sample.

use "data/Carneiro_et_al_2017.dta", clear
count
local X age age2 r_protest r_cathol r_other elem_f jsec_f edumiss_f elem_m jsec_m edumiss_m rural kmsd prov_*

// calculate number of missings and subset to obs with 0 missings
egen nmiss = rowmiss(`X' learnhr00 dschool kmsmp)
keep if nmiss == 0

sum learnhr00
(INDIVIDUAL DATA IFLS2/IFLS3)
  3,756
(1,148 observations deleted)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   learnhr00 |      2,608    7.779145    .9320488   3.775564   12.62344

In this context, our “treatment” variable of interest is the binary measure of whether an individual attended upper secondary school (dschool). The authors also propose an instrument (kmsmp), which is a measure of the distance from each individual’s community head’s office to the nearest secondary school. In this call out we do not discuss the assumptions related to this IV, but rather follow the authors in using this, given the importance of instruments in this setting to trace out the MTE over a meaningful range of the propensity score.

Propensity Score Estimation and Common Support

Given the central nature of the propensity score in the MTE framework, we begin with its estimation. We estimate the propensity score using a logit model where the binary treatment indicator dschool is regressed on the full set of covariates (which will be included in models below), along with the instrument. Specifically, the specification includes the distance to the nearest secondary school (kmsmp), all interaction terms of covariates with the instrument (INT_*), and the baseline set of individual and household characteristics contained in the vector X defined above (age and age squared, parental education indicators, religious affiliation, rural status, distance to the closest health post, and province fixed effects). Below we estimate the logit, and then generate each indiviudal’s predicted probability of schooling, ie the propensity score.

logit dschool kmsmp INT_* `X' 
predict ps_manual

Iteration 0:  Log likelihood = -1770.7731  
Iteration 1:  Log likelihood = -1428.7702  
Iteration 2:  Log likelihood = -1424.4685  
Iteration 3:  Log likelihood = -1424.4386  
Iteration 4:  Log likelihood = -1424.4384  
Iteration 5:  Log likelihood = -1424.4384  

Logistic regression                                     Number of obs =  2,608
                                                        LR chi2(38)   = 692.67
                                                        Prob > chi2   = 0.0000
Log likelihood = -1424.4384                             Pseudo R2     = 0.1956

------------------------------------------------------------------------------
     dschool | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       kmsmp |   .0073494   .7808786     0.01   0.992    -1.523145    1.537843
     INT_age |  -.0084515   .0400028    -0.21   0.833    -.0868556    .0699526
    INT_age2 |   .0060391   .0501185     0.12   0.904    -.0921915    .1042696
INT_r_prot~t |   -.057749   .1935515    -0.30   0.765     -.437103     .321605
INT_r_cathol |     .20726   .1868226     1.11   0.267    -.1589057    .5734256
 INT_r_other |   .5108877   .2144293     2.38   0.017     .0906141    .9311614
  INT_elem_f |    -.03977   .1070467    -0.37   0.710    -.2495776    .1700376
  INT_jsec_f |   .1865148    .160131     1.16   0.244    -.1273361    .5003657
INT_edumis~f |  -.1292267   .3032471    -0.43   0.670      -.72358    .4651267
  INT_elem_m |  -.0320549   .1050362    -0.31   0.760    -.2379222    .1738123
  INT_jsec_m |   .1272276   .2849039     0.45   0.655    -.4311737     .685629
INT_edumis~m |  -.1547662   .1579775    -0.98   0.327    -.4643964     .154864
   INT_rural |   .1230443   .0974816     1.26   0.207    -.0680162    .3141048
         age |   .0796222   .0619637     1.28   0.199    -.0418244    .2010687
        age2 |  -.0947019   .0771591    -1.23   0.220    -.2459308    .0565271
   r_protest |   .7912643    .343698     2.30   0.021     .1176286      1.4649
    r_cathol |   .8546868   .5022555     1.70   0.089    -.1297159     1.83909
     r_other |   -.314257   .4268858    -0.74   0.462    -1.150938    .5224238
      elem_f |    .791681   .1704868     4.64   0.000     .4575331    1.125829
      jsec_f |   1.648397   .2372621     6.95   0.000     1.183372    2.113423
   edumiss_f |   .2470576    .393068     0.63   0.530    -.5233415    1.017457
      elem_m |   .4923894   .1672731     2.94   0.003     .1645402    .8202387
      jsec_m |   1.777043    .328326     5.41   0.000     1.133536     2.42055
   edumiss_m |   .5050451   .2219528     2.28   0.023     .0700255    .9400646
       rural |  -.7433161   .1535691    -4.84   0.000    -1.044306   -.4423262
        kmsd |   .0000724   .0403877     0.00   0.999    -.0790861    .0792309
   prov_NSUM |  -.2498437   .2283159    -1.09   0.274    -.6973347    .1976473
   prov_WSUM |  -.4095057   .2295217    -1.78   0.074    -.8593599    .0403486
   prov_SSUM |   .3946397   .2539313     1.55   0.120    -.1030565    .8923359
   prov_LAMP |   .0447062   .3413887     0.13   0.896    -.6244034    .7138158
   prov_JAKA |    .322105    .169165     1.90   0.057    -.0094524    .6536624
   prov_CJAV |  -.3341036    .175897    -1.90   0.058    -.6788554    .0106482
   prov_YOGI |   .6693904   .2035069     3.29   0.001     .2705241    1.068257
   prov_EJAV |  -.0387919   .1632515    -0.24   0.812    -.3587589    .2811751
   prov_BALI |   .6922647    .398747     1.74   0.083     -.089265    1.473794
  prov_WNUSA |   .8477225   .2315898     3.66   0.000     .3938149     1.30163
  prov_SKALI |   .9996682   .2856579     3.50   0.000     .4397891    1.559547
   prov_SSUL |   .4733182   .2683167     1.76   0.078    -.0525729    .9992092
       _cons |  -2.813722   1.218604    -2.31   0.021    -5.202142   -.4253022
------------------------------------------------------------------------------
(option pr assumed; Pr(dschool))

Given that MTEs can only be identified over the support of the propensity score, hereafter \(P\), it is important to understand its distribution, and in particular the overlap across individuals who did and did not attend upper secondary school.

// Plot for untreated
twoway histogram ps_manual if dschool==0,             ///
       fraction start(0) bin(30)                      ///
       yscale(range(0 0.10))                          ///
       xtitle("less than upper secondary")            ///
       ytitle("") xlabel(0(.2)1, format("%03.1f"))    ///
       ylabel(0(.02).1, format("%03.1f")) legend(off) ///
       name(panel0, replace) nodraw

// Plot for treated
twoway histogram ps_manual if dschool==1,             ///
       fraction start(0) bin(30)                      ///
       yscale(range(0 0.10))                          ///
       xtitle("less than upper secondary")            ///
       ytitle("") xlabel(0(.2)1, format("%03.1f"))    ///
       ylabel(0(.02).1, format("%03.1f")) legend(off) ///
       name(panel1, replace) nodraw

// combine
graph combine panel0 panel1, col(2) ///
    imargin(zero) graphregion(color(white))
Figure 2: Propensity score by treatment status

To further assess the support conditions, it is useful to examine not only the overall distribution of the propensity score, but also how this distribution varies over the support of all covariates \(X\). This relates to a point raised by Carneiro, Heckman, and Vytlacil (2011) whote note:

“If all we are willing to assume is that (\(U_0\), \(U_1\),V) is independent of \(Z\) given \(X\), then it is only possible to estimate the MTE over the support of \(P\) conditional on \(X\).” (Carneiro, Heckman, and Vytlacil (2011), p. 2768)

To consider the relevance of this, we can follow Carneiro, Heckman, and Vytlacil (2011) in plotting the marginal distribution of \(P|X\). However, given that \(X\) is multidimensional, this is considered over an index \(X(\delta_1 - \delta_0)\). To do this, we estimate separate outcome equations for individuals with and without upper secondary schooling, obtain the coefficient vectors \(\hat{\delta}_1\) and \(\hat{\delta}_0\), and take their difference. Multiplying this difference by each individual’s covariates yields the index \(X(\hat{\delta}_1 - \hat{\delta}_0)\), which summarizes the observable component of the return to schooling. We generate this index below:

reg learnhr00 `X' if dschool==1
matrix delta1_hat = e(b)

reg learnhr00 `X' if dschool==0
matrix delta0_hat = e(b)

matrix delta_diff = delta1_hat - delta0_hat

gen index_X = delta_diff[1,"_cons"]

foreach x of varlist `X' {
    qui replace index_X = index_X + delta_diff[1,"`x'"] * `x'
}

      Source |       SS           df       MS      Number of obs   =     1,085
-------------+----------------------------------   F(25, 1059)     =     12.11
       Model |   185.33148        25  7.41325919   Prob > F        =    0.0000
    Residual |  648.263606     1,059  .612146937   R-squared       =    0.2223
-------------+----------------------------------   Adj R-squared   =    0.2040
       Total |  833.595086     1,084  .768999157   Root MSE        =     .7824

------------------------------------------------------------------------------
   learnhr00 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         age |   .0215925   .0252303     0.86   0.392    -.0279146    .0710996
        age2 |   .0246372   .0316145     0.78   0.436     -.037397    .0866714
   r_protest |   .0757296   .1151786     0.66   0.511    -.1502746    .3017338
    r_cathol |   .0162003   .1457541     0.11   0.912    -.2697993    .3021999
     r_other |   .2820444   .1829982     1.54   0.124    -.0770358    .6411246
      elem_f |    .078496   .0793495     0.99   0.323    -.0772042    .2341961
      jsec_f |    .215111   .0924853     2.33   0.020     .0336357    .3965862
   edumiss_f |  -.2219194   .1847318    -1.20   0.230    -.5844013    .1405625
      elem_m |  -.1319927   .0717833    -1.84   0.066    -.2728464     .008861
      jsec_m |  -.0443383   .0942678    -0.47   0.638    -.2293112    .1406345
   edumiss_m |  -.2809497   .0972807    -2.89   0.004    -.4718345   -.0900649
       rural |   .2694713   .0615287     4.38   0.000     .1487393    .3902032
        kmsd |   .0175306   .0227574     0.77   0.441    -.0271241    .0621853
   prov_NSUM |  -.0700171   .1203208    -0.58   0.561    -.3061113    .1660771
   prov_WSUM |  -.0175517    .124942    -0.14   0.888    -.2627137    .2276104
   prov_SSUM |   .0931117   .1241732     0.75   0.454    -.1505418    .3367652
   prov_LAMP |  -.4253259   .2033418    -2.09   0.037    -.8243245   -.0263273
   prov_JAKA |  -.0136508   .0812943    -0.17   0.867     -.173167    .1458654
   prov_CJAV |  -.0210841   .1013381    -0.21   0.835    -.2199304    .1777621
   prov_YOGI |  -.2771071   .0994647    -2.79   0.005    -.4722775   -.0819367
   prov_EJAV |   -.133941    .090486    -1.48   0.139    -.3114933    .0436113
   prov_BALI |  -.2803235   .1998733    -1.40   0.161    -.6725162    .1118691
  prov_WNUSA |  -.1060589   .1282795    -0.83   0.409    -.3577698     .145652
  prov_SKALI |   .2847612   .1357351     2.10   0.036     .0184208    .5511015
   prov_SSUL |   .0746629   .1418464     0.53   0.599    -.2036691    .3529949
       _cons |   6.993181   .5007331    13.97   0.000     6.010639    7.975723
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =     1,523
-------------+----------------------------------   F(25, 1497)     =      4.20
       Model |  72.3608941        25  2.89443577   Prob > F        =    0.0000
    Residual |  1032.56354     1,497  .689755201   R-squared       =    0.0655
-------------+----------------------------------   Adj R-squared   =    0.0499
       Total |  1104.92443     1,522  .725968745   Root MSE        =    .83052

------------------------------------------------------------------------------
   learnhr00 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         age |   .0375154   .0194883     1.93   0.054    -.0007119    .0757427
        age2 |  -.0425386   .0238301    -1.79   0.074    -.0892825    .0042053
   r_protest |   .3630815   .1503615     2.41   0.016     .0681399     .658023
    r_cathol |   .0471253   .2368028     0.20   0.842    -.4173752    .5116259
     r_other |  -.0425442   .1787488    -0.24   0.812    -.3931688    .3080805
      elem_f |   .0895785   .0545888     1.64   0.101    -.0175002    .1966571
      jsec_f |   .1319211   .1039487     1.27   0.205    -.0719794    .3358215
   edumiss_f |   .0023904   .1244665     0.02   0.985    -.2417568    .2465376
      elem_m |  -.0422936   .0570458    -0.74   0.459    -.1541918    .0696047
      jsec_m |    .162417   .1597964     1.02   0.310    -.1510316    .4758656
   edumiss_m |  -.1783401   .0723875    -2.46   0.014    -.3203318   -.0363484
       rural |  -.0026031   .0472283    -0.06   0.956    -.0952438    .0900377
        kmsd |  -.0381332   .0147462    -2.59   0.010    -.0670585   -.0092078
   prov_NSUM |   .1532799   .1035395     1.48   0.139    -.0498179    .3563778
   prov_WSUM |   .4086704    .103365     3.95   0.000     .2059148    .6114259
   prov_SSUM |   .2935233   .1341638     2.19   0.029     .0303543    .5566923
   prov_LAMP |   .1783531   .1402949     1.27   0.204    -.0968424    .4535486
   prov_JAKA |  -.0015451   .0889375    -0.02   0.986    -.1760005    .1729103
   prov_CJAV |   -.014003   .0725471    -0.19   0.847    -.1563077    .1283017
   prov_YOGI |  -.2556562   .1065914    -2.40   0.017    -.4647406   -.0465718
   prov_EJAV |   .0371047   .0708096     0.52   0.600    -.1017919    .1760012
   prov_BALI |  -.0779303   .1942081    -0.40   0.688    -.4588793    .3030186
  prov_WNUSA |   -.290734   .1106153    -2.63   0.009    -.5077114   -.0737567
  prov_SKALI |   .5672993   .1575762     3.60   0.000     .2582056    .8763929
   prov_SSUL |  -.1162315   .1251471    -0.93   0.353    -.3617137    .1292507
       _cons |    6.69554   .3889117    17.22   0.000      5.93267    7.458409
------------------------------------------------------------------------------

With this index, we estimate a conditional density \(f(P \mid X)\), which is the density of the propensity score \(P\) at each point of the index. We do this nonparametrically by dividing the covariate support into 50 bins and estimating the propensity score density separately within each bin. We do this by dividing the covariate index into 50 equal-frequency bins using quantiles, and within each bin estimating the kernel density of the propensity score over a fine grid of 50 equally-spaced points. The resulting density values are then normalised within each bin so that they sum to one, giving an estimate of \(f(P \mid X = x)\) for each bin’s representative value of \(x\). In essence, this simply builds densities locally within small sections of the data. This yields a dataset of triplets \((x, P, \hat{f}(P \mid x))\) across the joint support of \(X\) and \(P\), which can be visualised as a surface showing how the distribution of the propensity scores shifts as the covariate index changes. Below we do this generating a frame called results to accumulate all results, appending in estimated densities bit by bit (this requires the frameappend program from the SSC).

xtile xbin = index_X, n(50)

// Create a frame to accumulate results
frame create results
frame results: gen xgrid  = .
frame results: gen pgrid  = .
frame results: gen f_cond = .

forvalues g = 1/50 {
    frame copy default slice_`g'
    frame slice_`g' {
        qui keep if xbin == `g'

        qui summarize index_X
        local xg = r(mean)
        if _N < 50 set obs 50

        qui gen pgrid  = (_n - 1) / 49 in 1/50
        kdensity ps_manual, at(pgrid) generate(fj) nograph
        keep pgrid fj
        keep in 1/50
        qui drop if missing(fj)
        egen rs = total(fj)
        gen  f_cond = fj / rs
        gen  xgrid  = `xg'

        keep xgrid pgrid f_cond
    }
    frame results: frameappend slice_`g'
    frame drop slice_`g'
}

frame change results
(3 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(3 observations deleted)
(2 observations deleted)
(3 observations deleted)
(1 observation deleted)
(2 observations deleted)
(2 observations deleted)
(3 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(3 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(3 observations deleted)
(1 observation deleted)
(3 observations deleted)
(2 observations deleted)
(3 observations deleted)
(1 observation deleted)
(3 observations deleted)
(1 observation deleted)
(2 observations deleted)
(4 observations deleted)
(1 observation deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(3 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(3 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)
(2 observations deleted)

Once we have this triplet of points of the X grid, the propensity score, and the density, we can plot these in a 3-d surface. We do this below using the surface command, which must be installed from the SSC.

surface xgrid pgrid f_cond, xtitle("X") ytitle("Propensity score") ztitle("f(P|X)")

Inspecting the resulting surface, we can see that while there is a positive density at many points of support of the observable index \(X\), there are also areas with essentially no covarage, namely areas with quite high values of the index and high propensity scores. Given this lack of full support over all values of \(X\), typically assumptions are invoked such that all we require is common support of the propensity score across treatment and untreated units. Assumptions such as additive separability allow for this, which implies assuming \(E(U_D|V,X)=E(U_D|V)\), or that the slope of the MTE is independent of \(X\).

If invoking this assumption, all we need to consider is the common support of \(P\) across treatment regimes. In Figure ?@fig-supportStata we observe quite broad common support, however below we generate a variable which indicates whether observations are in the region of common support considering maximum and minimum propensity scores in each group. We will limit our analysis by removing the relatively small subset of observations (around 1%) for which there is no overlap.

frame change default

summarize ps_manual if dschool==1, meanonly
local min1 = r(min)
local max1 = r(max)

summarize ps_manual if dschool==0, meanonly
local min0 = r(min)
local max0 = r(max)

local CS_min = max(`min1', `min0')
local CS_max = min(`max1', `max0')

gen CS_dummy = (ps_manual >= `CS_min' & ps_manual <= `CS_max')

tab CS_dummy
keep if CS_dummy == 1

   CS_dummy |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         32        1.23        1.23
          1 |      2,576       98.77      100.00
------------+-----------------------------------
      Total |      2,608      100.00
(32 observations deleted)

Estimating Marginal Treatment Effects

A Parametric Approach

There are multiple ways in which we can implement MTEs, and at times these can be quite computationally challenging. A simple and very illustrative way to estimate MTEs is through a parametric approach. In essence, all this requires is for us to model \(E[Y \mid P]\) as a flexible polynomial or spline (in terms of \(P\)), along with all relevant covariates. Then MTE is then the derivative of \(E[Y \mid P]\) with respect to \(P\) across all points of support of the propensity score. Consider the below “manual” implementation of such a parametric approach. Here we include the propensity score in a linear way along with 3 higher polynomial terms. We also include all controls both in levels, as well as interacted with the propensity score. This latter term allows us to consider whether returns to individual characteristics themselves depend on the likelihood of being treated.

foreach v of varlist `X' {
    gen PX_`v' = ps_manual * `v'
}

// Estimate outcome model with parametric propensity score
reg learnhr00 `X' PX_* c.ps_manual##c.ps_manual##c.ps_manual##c.ps_manual, vce(robust)

Linear regression                               Number of obs     =      2,576
                                                F(54, 2521)       =       7.16
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1216
                                                Root MSE          =     .87847

------------------------------------------------------------------------------
             |               Robust
   learnhr00 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         age |   .0340786   .0348033     0.98   0.328    -.0341673    .1023245
        age2 |  -.0386807   .0436257    -0.89   0.375    -.1242267    .0468652
   r_protest |   .2829874   .2571772     1.10   0.271    -.2213127    .7872875
    r_cathol |   -.755055    .689677    -1.09   0.274    -2.107446    .5973364
     r_other |   .3650607    .338851     1.08   0.281     -.299394    1.029515
      elem_f |   .0235212   .1841555     0.13   0.898    -.3375903    .3846326
      jsec_f |  -.1936583   .5559555    -0.35   0.728    -1.283834    .8965179
   edumiss_f |   .1622626    .257284     0.63   0.528     -.342247    .6667722
      elem_m |   -.259223   .1405916    -1.84   0.065    -.5349098    .0164638
      jsec_m |  -1.863969   .6854759    -2.72   0.007    -3.208122   -.5198151
   edumiss_m |  -.2362824    .134332    -1.76   0.079    -.4996948      .02713
       rural |   .2341012   .1340383     1.75   0.081    -.0287352    .4969375
        kmsd |  -.0019823   .0250122    -0.08   0.937    -.0510289    .0470643
   prov_NSUM |   .3988372   .1643358     2.43   0.015     .0765902    .7210841
   prov_WSUM |   .4225493   .1856002     2.28   0.023     .0586048    .7864938
   prov_SSUM |   .3791079   .2321428     1.63   0.103    -.0761021     .834318
   prov_LAMP |   .0732614   .2076859     0.35   0.724    -.3339909    .4805138
   prov_JAKA |  -.2199358   .1840723    -1.19   0.232    -.5808842    .1410126
   prov_CJAV |   .1565181   .1234013     1.27   0.205    -.0854601    .3984963
   prov_YOGI |  -.0388907   .2648551    -0.15   0.883    -.5582464    .4804651
   prov_EJAV |  -.0568098   .1188009    -0.48   0.633    -.2897671    .1761476
   prov_BALI |  -.8585962   .4214873    -2.04   0.042    -1.685093   -.0320995
  prov_WNUSA |  -.4206106   .2690803    -1.56   0.118    -.9482516    .1070304
  prov_SKALI |  -.1589465    .353084    -0.45   0.653    -.8513109    .5334178
   prov_SSUL |   -.163502   .3082135    -0.53   0.596    -.7678796    .4408756
      PX_age |  -.0300835   .0816946    -0.37   0.713     -.190279    .1301119
     PX_age2 |   .0931114   .1047696     0.89   0.374    -.1123319    .2985548
PX_r_protest |   -.041885   .4579538    -0.09   0.927    -.9398891    .8561191
 PX_r_cathol |   1.341191   1.017201     1.32   0.187    -.6534442    3.335826
  PX_r_other |  -.4489369   .5531701    -0.81   0.417    -1.533651    .6357773
   PX_elem_f |   .0718183   .6337444     0.11   0.910    -1.170895    1.314531
   PX_jsec_f |   .6792679   1.108211     0.61   0.540     -1.49383    2.852366
PX_edumiss_f |  -.7220184   .8531823    -0.85   0.397    -2.395028    .9509914
   PX_elem_m |   .5037765   .3606239     1.40   0.163    -.2033729    1.210926
   PX_jsec_m |    2.99703    1.14227     2.62   0.009     .7571476    5.236913
PX_edumiss_m |   .0904476    .381019     0.24   0.812    -.6566946    .8375898
    PX_rural |  -.2224453   .2993343    -0.74   0.457    -.8094116     .364521
     PX_kmsd |  -.0082815   .0675811    -0.12   0.902    -.1408016    .1242385
PX_prov_NSUM |  -.8603086   .3331372    -2.58   0.010    -1.513559   -.2070581
PX_prov_WSUM |  -.3933423   .4266039    -0.92   0.357    -1.229872    .4431877
PX_prov_SSUM |  -.3483039     .42381    -0.82   0.411    -1.179355    .4827474
PX_prov_LAMP |  -.3994513    .538074    -0.74   0.458    -1.454563    .6556608
PX_prov_JAKA |   .4034137   .3253742     1.24   0.215    -.2346143    1.041442
PX_prov_CJAV |  -.5242054   .3036001    -1.73   0.084    -1.119536    .0711257
PX_prov_YOGI |  -.2977225   .4646142    -0.64   0.522    -1.208787    .6133421
PX_prov_EJAV |     .11312    .258806     0.44   0.662    -.3943741    .6206141
PX_prov_BALI |   1.358337   .6941833     1.96   0.050    -.0028904    2.719565
PX_prov_WN~A |   .5349495   .5703744     0.94   0.348    -.5835007      1.6534
PX_prov_SK~I |   1.026032   .6227241     1.65   0.100    -.1950713    2.247135
PX_prov_SSUL |   .3579263   .6234144     0.57   0.566    -.8645305    1.580383
   ps_manual |   5.321032   3.321564     1.60   0.109    -1.192241    11.83431
             |
 c.ps_manual#|
 c.ps_manual |  -16.76973    11.6951    -1.43   0.152    -39.70272    6.163256
             |
 c.ps_manual#|
 c.ps_manual#|
 c.ps_manual |   24.69901   16.34071     1.51   0.131    -7.343577    56.74159
             |
 c.ps_manual#|
 c.ps_manual#|
 c.ps_manual#|
 c.ps_manual |  -14.14608   8.698936    -1.63   0.104    -31.20387    2.911714
             |
       _cons |   6.255667   .6771674     9.24   0.000     4.927806    7.583528
------------------------------------------------------------------------------

Once we have this parametric implementation, we simply can calculate a marginal treatment effect by exploring how our outcome \(E[Y|X]\) varies with the propensity score—or the resistance to treatment. This quantity is the marginal treatment effect, defined as in (8.42) of the book. Fortunately this is relatively easily calculated at a range of propensity scores using Stata’s margins command. We do this below, calculating the marginal effect of a change in the propensity score, saving the resulting effects, and their default standard errors. Finally, we can plot these marginal treatment effects as they vary with \(P(Z)\).

// Generate marginal treatment effects (dy/dPS)
margins, dydx(ps_manual) at(ps_manual=(0(0.01)1)) saving(mte_grid, replace)

// Examine output of this
preserve
use mte_grid, clear

gen double P   = _at51
gen double mte = _margin
gen double se  = _se_margin

gen double LB = mte + invnormal(0.05)*se
gen double UB = mte + invnormal(0.95)*se

sort P
twoway rarea LB UB P, legend(off) color(gs11%50) ///
|| line  mte P, lwidth(medthick) lcolor(navy)    ///
    xtitle("P(Z,X)") ytitle("MTE") ///
    graphregion(color(white)) plotregion(color(white))
restore
(Note: Below code run with echo to enable preserve/restore functionality.)


Average marginal effects                                 Number of obs = 2,576
Model VCE: Robust

Expression: Linear prediction, predict()
dy/dx wrt:  ps_manual
1._at:   ps_manual =   0
2._at:   ps_manual = .01
3._at:   ps_manual = .02
4._at:   ps_manual = .03
5._at:   ps_manual = .04
6._at:   ps_manual = .05
7._at:   ps_manual = .06
8._at:   ps_manual = .07
9._at:   ps_manual = .08
10._at:  ps_manual = .09
11._at:  ps_manual =  .1
12._at:  ps_manual = .11
13._at:  ps_manual = .12
14._at:  ps_manual = .13
15._at:  ps_manual = .14
16._at:  ps_manual = .15
17._at:  ps_manual = .16
18._at:  ps_manual = .17
19._at:  ps_manual = .18
20._at:  ps_manual = .19
21._at:  ps_manual =  .2
22._at:  ps_manual = .21
23._at:  ps_manual = .22
24._at:  ps_manual = .23
25._at:  ps_manual = .24
26._at:  ps_manual = .25
27._at:  ps_manual = .26
28._at:  ps_manual = .27
29._at:  ps_manual = .28
30._at:  ps_manual = .29
31._at:  ps_manual =  .3
32._at:  ps_manual = .31
33._at:  ps_manual = .32
34._at:  ps_manual = .33
35._at:  ps_manual = .34
36._at:  ps_manual = .35
37._at:  ps_manual = .36
38._at:  ps_manual = .37
39._at:  ps_manual = .38
40._at:  ps_manual = .39
41._at:  ps_manual =  .4
42._at:  ps_manual = .41
43._at:  ps_manual = .42
44._at:  ps_manual = .43
45._at:  ps_manual = .44
46._at:  ps_manual = .45
47._at:  ps_manual = .46
48._at:  ps_manual = .47
49._at:  ps_manual = .48
50._at:  ps_manual = .49
51._at:  ps_manual =  .5
52._at:  ps_manual = .51
53._at:  ps_manual = .52
54._at:  ps_manual = .53
55._at:  ps_manual = .54
56._at:  ps_manual = .55
57._at:  ps_manual = .56
58._at:  ps_manual = .57
59._at:  ps_manual = .58
60._at:  ps_manual = .59
61._at:  ps_manual =  .6
62._at:  ps_manual = .61
63._at:  ps_manual = .62
64._at:  ps_manual = .63
65._at:  ps_manual = .64
66._at:  ps_manual = .65
67._at:  ps_manual = .66
68._at:  ps_manual = .67
69._at:  ps_manual = .68
70._at:  ps_manual = .69
71._at:  ps_manual =  .7
72._at:  ps_manual = .71
73._at:  ps_manual = .72
74._at:  ps_manual = .73
75._at:  ps_manual = .74
76._at:  ps_manual = .75
77._at:  ps_manual = .76
78._at:  ps_manual = .77
79._at:  ps_manual = .78
80._at:  ps_manual = .79
81._at:  ps_manual =  .8
82._at:  ps_manual = .81
83._at:  ps_manual = .82
84._at:  ps_manual = .83
85._at:  ps_manual = .84
86._at:  ps_manual = .85
87._at:  ps_manual = .86
88._at:  ps_manual = .87
89._at:  ps_manual = .88
90._at:  ps_manual = .89
91._at:  ps_manual =  .9
92._at:  ps_manual = .91
93._at:  ps_manual = .92
94._at:  ps_manual = .93
95._at:  ps_manual = .94
96._at:  ps_manual = .95
97._at:  ps_manual = .96
98._at:  ps_manual = .97
99._at:  ps_manual = .98
100._at: ps_manual = .99
101._at: ps_manual =   1

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ps_manual    |
         _at |
          1  |   5.321032   3.321564     1.60   0.109    -1.192241    11.83431
          2  |   4.992991   3.125635     1.60   0.110    -1.136084    11.12207
          3  |   4.679429   2.941938     1.59   0.112    -1.089433    10.44829
          4  |   4.380008   2.770527     1.58   0.114    -1.052734     9.81275
          5  |   4.094388   2.611462     1.57   0.117    -1.026443    9.215218
          6  |   3.822229   2.464801     1.55   0.121    -1.011014    8.655471
          7  |   3.563191    2.33059     1.53   0.126    -1.006875    8.133258
          8  |   3.316937   2.208845     1.50   0.133    -1.014399    7.648273
          9  |   3.083125   2.099535     1.47   0.142    -1.033866    7.200115
         10  |   2.861416   2.002564     1.43   0.153    -1.065422    6.788254
         11  |   2.651472   1.917742     1.38   0.167    -1.109038    6.411982
         12  |   2.452951   1.844771     1.33   0.184    -1.164471    6.070374
         13  |   2.265516   1.783231     1.27   0.204    -1.231231    5.762263
         14  |   2.088826   1.732564     1.21   0.228    -1.308569    5.486221
         15  |   1.922541    1.69209     1.14   0.256    -1.395486    5.240569
         16  |   1.766323   1.661009     1.06   0.288    -1.490759    5.023406
         17  |   1.619832   1.638437     0.99   0.323    -1.592988    4.832653
         18  |   1.482728   1.623429     0.91   0.361    -1.700663    4.666119
         19  |   1.354672   1.615018     0.84   0.402    -1.812226     4.52157
         20  |   1.235325   1.612247     0.77   0.444    -1.926139    4.396788
         21  |   1.124345   1.614198     0.70   0.486    -2.040944    4.289635
         22  |   1.021396   1.620014     0.63   0.528    -2.155298     4.19809
         23  |   .9261359   1.628915     0.57   0.570    -2.268012    4.120284
         24  |   .8382263   1.640206     0.51   0.609    -2.378063    4.054516
         25  |   .7573275   1.653281     0.46   0.647    -2.484601    3.999256
         26  |   .6830998    1.66762     0.41   0.682    -2.586945    3.953144
         27  |   .6152041   1.682783     0.37   0.715    -2.684575    3.914983
         28  |   .5533004    1.69841     0.33   0.745    -2.777122    3.883723
         29  |   .4970496   1.714208     0.29   0.772    -2.864351     3.85845
         30  |    .446112   1.729945     0.26   0.797    -2.946147    3.838371
         31  |   .4001481   1.745444     0.23   0.819    -3.022503    3.822799
         32  |   .3588185   1.760574     0.20   0.839    -3.093501    3.811138
         33  |   .3217836   1.775247     0.18   0.856    -3.159307    3.802875
         34  |   .2887039   1.789407     0.16   0.872    -3.220155    3.797563
         35  |   .2592399   1.803032     0.14   0.886    -3.276335    3.794815
         36  |   .2330522   1.816122     0.13   0.898    -3.328191    3.794295
         37  |   .2098011     1.8287     0.11   0.909    -3.376107    3.795709
         38  |   .1891472   1.840808     0.10   0.918    -3.420502    3.798797
         39  |   .1707511   1.852501     0.09   0.927    -3.461828     3.80333
         40  |   .1542731   1.863848     0.08   0.934    -3.500557    3.809103
         41  |   .1393737   1.874929     0.07   0.941    -3.537184    3.815932
         42  |   .1257136    1.88583     0.07   0.947    -3.572221    3.823648
         43  |   .1129531   1.896645     0.06   0.953    -3.606189    3.832095
         44  |   .1007527   1.907474     0.05   0.958    -3.639624     3.84113
         45  |   .0887731    1.91842     0.05   0.963    -3.673067    3.850613
         46  |   .0766746   1.929589     0.04   0.968    -3.707066    3.860415
         47  |   .0641176   1.941089     0.03   0.974    -3.742174    3.870409
         48  |   .0507629   1.953031     0.03   0.979    -3.778946    3.880472
         49  |   .0362708   1.965526     0.02   0.985     -3.81794    3.890482
         50  |   .0203018   1.978688     0.01   0.992    -3.859718    3.900322
         51  |   .0025164    1.99263     0.00   0.999    -3.904842    3.909875
         52  |  -.0174248   2.007466    -0.01   0.993    -3.953876    3.919026
         53  |  -.0398614   2.023313    -0.02   0.984    -4.007388    3.927665
         54  |   -.065133   2.040289    -0.03   0.975    -4.065948    3.935682
         55  |  -.0935791   2.058514    -0.05   0.964    -4.130131    3.942973
         56  |  -.1255389    2.07811    -0.06   0.952    -4.200517    3.949439
         57  |  -.1613522   2.099204    -0.08   0.939    -4.277692    3.954987
         58  |  -.2013583   2.121924    -0.09   0.924     -4.36225    3.959534
         59  |  -.2458969   2.146406    -0.11   0.909    -4.454796    3.963002
         60  |  -.2953074    2.17279    -0.14   0.892    -4.555944    3.965329
         61  |  -.3499297   2.201224    -0.16   0.874    -4.666322    3.966462
         62  |  -.4101026    2.23186    -0.18   0.854    -4.786569    3.966364
         63  |  -.4761659    2.26486    -0.21   0.833    -4.917343    3.965011
         64  |  -.5484592   2.300395    -0.24   0.812    -5.059317    3.962398
         65  |   -.627322   2.338643    -0.27   0.789     -5.21318    3.958536
         66  |  -.7130937   2.379792    -0.30   0.764    -5.379641    3.953454
         67  |  -.8061144    2.42404    -0.33   0.740    -5.559428      3.9472
         68  |  -.9067225   2.471594    -0.37   0.714    -5.753285     3.93984
         69  |  -1.015258    2.52267    -0.40   0.687    -5.961976     3.93146
         70  |  -1.132061   2.577494    -0.44   0.661    -6.186283    3.922161
         71  |   -1.25747     2.6363    -0.48   0.633    -6.427004    3.912065
         72  |  -1.391825    2.69933    -0.52   0.606    -6.684955    3.901305
         73  |  -1.535466   2.766834    -0.55   0.579    -6.960965    3.890033
         74  |  -1.688732   2.839066    -0.59   0.552    -7.255873    3.878409
         75  |  -1.851962    2.91629    -0.64   0.525    -7.570531    3.866607
         76  |  -2.025496    2.99877    -0.68   0.499      -7.9058    3.854807
         77  |  -2.209674   3.086774    -0.72   0.474    -8.262546    3.843198
         78  |  -2.404835   3.180574    -0.76   0.450     -8.64164    3.831971
         79  |  -2.611318   3.280443    -0.80   0.426    -9.043956     3.82132
         80  |  -2.829464   3.386652    -0.84   0.404    -9.470368    3.811439
         81  |  -3.059611   3.499471    -0.87   0.382    -9.921744    3.802521
         82  |  -3.302099   3.619172    -0.91   0.362    -10.39895    3.794755
         83  |  -3.557267   3.746021    -0.95   0.342    -10.90286    3.788326
         84  |  -3.825456   3.880283    -0.99   0.324    -11.43432    3.783411
         85  |  -4.107004   4.022217    -1.02   0.307    -11.99419    3.780184
         86  |  -4.402253   4.172083    -1.06   0.291    -12.58331    3.778808
         87  |  -4.711538   4.330131    -1.09   0.277    -13.20252     3.77944
         88  |  -5.035202   4.496612    -1.12   0.263    -13.85263    3.782228
         89  |  -5.373583   4.671768    -1.15   0.250    -14.53448    3.787312
         90  |  -5.727022   4.855841    -1.18   0.238    -15.24887    3.794824
         91  |  -6.095857   5.049067    -1.21   0.227     -15.9966    3.804887
         92  |   -6.48043    5.25168    -1.23   0.217    -16.77848    3.817618
         93  |  -6.881077   5.463905    -1.26   0.208    -17.59528    3.833124
         94  |  -7.298139    5.68597    -1.28   0.199    -18.44779     3.85151
         95  |  -7.731955   5.918095    -1.31   0.192    -19.33678    3.872869
         96  |  -8.182866     6.1605    -1.33   0.184    -20.26302    3.897293
         97  |   -8.65121   6.413402    -1.35   0.177    -21.22729    3.924865
         98  |  -9.137331   6.677016    -1.37   0.171    -22.23033    3.955667
         99  |  -9.641561   6.951551    -1.39   0.166     -23.2729    3.989774
        100  |  -10.16424   7.237219    -1.40   0.160    -24.35574    4.027259
        101  |  -10.70572   7.534228    -1.42   0.155    -25.47962    4.068191
------------------------------------------------------------------------------


(Created by command margins; also see char list)









Figure 3: Marginal Treatment Effects Under a Polynomical Specification

?@fig-MTEparametricStata plots the MTE as a function of the propensity score. The MTE measures the marginal return to upper secondary schooling for individuals with a given probability of enrolling. The figure reveals individuals with a higher propensity to attend upper secondary school tend to experience higher marginal returns, while individuals with a lower propensity exhibit lower returns.

While our approach here is quite manual, we can see that it is in very close agreement to libraries which implement this in a fully-fledged way. Below we compare our approach to Andresen (2018)’s mtefe package available from the SSC (which also requires the installation of nearmrg and moremata).

mtefe learnhr00 `X' ///
    (dschool = kmsmp INT_* `X'), ///
    link(logit) ///
    polynomial(3) ///
    gridpoints(60) ///
    level(90) ///
    second
HERE

      Source |       SS           df       MS      Number of obs   =     2,576
-------------+----------------------------------   F(55, 2521)     =   3691.86
       Model |   156593.54        55  2847.15528   Prob > F        =    0.0000
    Residual |  1944.19059     2,521  .771198172   R-squared       =    0.9877
-------------+----------------------------------   Adj R-squared   =    0.9875
       Total |  158537.731     2,576  61.5441503   Root MSE        =    .87818

------------------------------------------------------------------------------
   learnhr00 | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         age |   .0319066   .0342996     0.93   0.352    -.0353518     .099165
        age2 |  -.0362341   .0419553    -0.86   0.388    -.1185045    .0460363
   r_protest |   .2553979   .2974977     0.86   0.391    -.3279669    .8387626
    r_cathol |  -.8787816   .6268888    -1.40   0.161    -2.108051    .3504882
     r_other |   .3779286   .3359816     1.12   0.261    -.2808995    1.036757
      elem_f |   .0137777   .1638979     0.08   0.933    -.3076107     .335166
      jsec_f |  -.2452753   .5574629    -0.44   0.660    -1.338407    .8478566
   edumiss_f |   .1853696   .2831397     0.65   0.513    -.3698406    .7405798
      elem_m |   -.282394    .130928    -2.16   0.031    -.5391315   -.0256565
      jsec_m |  -2.015192   .7811765    -2.58   0.010    -3.547005   -.4833788
   edumiss_m |  -.2444759    .141943    -1.72   0.085    -.5228127     .033861
       rural |    .257322   .1335611     1.93   0.054    -.0045787    .5192227
        kmsd |  -.0035291   .0276268    -0.13   0.898    -.0577026    .0506443
   prov_NSUM |   .4171568   .1733759     2.41   0.016     .0771831    .7571304
   prov_WSUM |   .4397358   .1774129     2.48   0.013     .0918458    .7876258
   prov_SSUM |   .3504452   .2444573     1.43   0.152    -.1289125    .8298029
   prov_LAMP |    .074863   .2389889     0.31   0.754    -.3937717    .5434977
   prov_JAKA |  -.2361269   .1745009    -1.35   0.176    -.5783067     .106053
   prov_CJAV |   .1769261   .1233941     1.43   0.152    -.0650381    .4188904
   prov_YOGI |  -.0796543   .2392064    -0.33   0.739    -.5487154    .3894069
   prov_EJAV |   -.056005   .1154807    -0.48   0.628    -.2824519    .1704418
   prov_BALI |  -.9146989   .4020874    -2.27   0.023    -1.703154   -.1262435
  prov_WNUSA |  -.4723495   .2686651    -1.76   0.079    -.9991764    .0544774
  prov_SKALI |  -.2128348   .3679641    -0.58   0.563    -.9343776    .5087081
   prov_SSUL |  -.1932583   .2207267    -0.88   0.381    -.6260825    .2395659
  1.__00001C |   6.193273   .6847162     9.05   0.000     4.850609    7.535937
             |
       c.age#|
  c.__00001G |  -.0263664   .0778346    -0.34   0.735    -.1789926    .1262599
             |
      c.age2#|
  c.__00001G |   .0888445     .09751     0.91   0.362    -.1023634    .2800524
             |
 c.r_protest#|
  c.__00001G |   .0076003   .5045574     0.02   0.988    -.9817891    .9969897
             |
  c.r_cathol#|
  c.__00001G |   1.511966   .9013705     1.68   0.094    -.2555361    3.279468
             |
   c.r_other#|
  c.__00001G |   -.475038   .5783082    -0.82   0.411    -1.609046    .6589697
             |
    c.elem_f#|
  c.__00001G |   .0435354   .5091902     0.09   0.932    -.9549383    1.042009
             |
    c.jsec_f#|
  c.__00001G |   .7114898   1.057225     0.67   0.501    -1.361628    2.784607
             |
 c.edumiss_f#|
  c.__00001G |  -.8366306   .8745023    -0.96   0.339    -2.551447    .8781856
             |
    c.elem_m#|
  c.__00001G |   .5413133    .325493     1.66   0.096    -.0969477    1.179574
             |
    c.jsec_m#|
  c.__00001G |   3.217151    1.20061     2.68   0.007     .8628679    5.571435
             |
 c.edumiss_m#|
  c.__00001G |   .0900733   .3765128     0.24   0.811    -.6482328    .8283794
             |
     c.rural#|
  c.__00001G |  -.2526226   .3035566    -0.83   0.405    -.8478683    .3426232
             |
      c.kmsd#|
  c.__00001G |  -.0046851   .0717574    -0.07   0.948    -.1453945    .1360244
             |
 c.prov_NSUM#|
  c.__00001G |  -.8878807   .3711039    -2.39   0.017     -1.61558    -.160181
             |
 c.prov_WSUM#|
  c.__00001G |   -.413396   .4207084    -0.98   0.326    -1.238365    .4115734
             |
 c.prov_SSUM#|
  c.__00001G |  -.3041441   .4461876    -0.68   0.496    -1.179076    .5707877
             |
 c.prov_LAMP#|
  c.__00001G |   -.407982   .6705631    -0.61   0.543    -1.722893    .9069288
             |
 c.prov_JAKA#|
  c.__00001G |   .4292202   .3111699     1.38   0.168    -.1809545    1.039395
             |
 c.prov_CJAV#|
  c.__00001G |  -.5671382   .3293601    -1.72   0.085    -1.212982    .0787059
             |
 c.prov_YOGI#|
  c.__00001G |  -.2345741   .4526054    -0.52   0.604    -1.122091    .6529424
             |
 c.prov_EJAV#|
  c.__00001G |   .1103112   .2721488     0.41   0.685    -.4233468    .6439692
             |
 c.prov_BALI#|
  c.__00001G |   1.443219   .7373255     1.96   0.050    -.0026064    2.889045
             |
          c. |
  prov_WNUSA#|
  c.__00001G |   .6206765   .5805962     1.07   0.285    -.5178177    1.759171
             |
          c. |
  prov_SKALI#|
  c.__00001G |   1.106056   .6591907     1.68   0.093    -.1865549    2.398666
             |
 c.prov_SSUL#|
  c.__00001G |   .4077686    .472223     0.86   0.388     -.518216    1.333753
             |
    __00001G |  -.9642707   2.204342    -0.44   0.662    -5.286777    3.358235
    __00002I |  -38.76967   24.57107    -1.58   0.115    -86.95123    9.411879
    __00002J |   84.33174    51.6404     1.63   0.103    -16.93019    185.5937
    __00002K |  -63.52247   36.55783    -1.74   0.082    -135.2089    8.163972
------------------------------------------------------------------------------


Parametric polynomial MTE model                              Obs. :      2,576
Treatment model: Logit
Estimation method: Local IV
------------------------------------------------------------------------------
   learnhr00 | Coefficient  Std. err.      t    P>|t|     [90% conf. interval]
-------------+----------------------------------------------------------------
beta0        |
         age |   .0319066   .0342996     0.93   0.352     -.024532    .0883452
        age2 |  -.0362341   .0419553    -0.86   0.388    -.1052699    .0328016
   r_protest |   .2553979   .2974977     0.86   0.391    -.2341221    .7449178
    r_cathol |  -.8787816   .6268888    -1.40   0.161    -1.910301    .1527379
     r_other |   .3779286   .3359816     1.12   0.261     -.174915    .9307722
      elem_f |   .0137777   .1638979     0.08   0.933    -.2559096    .2834649
      jsec_f |  -.2452753   .5574629    -0.44   0.660    -1.162557    .6720065
   edumiss_f |   .1853696   .2831397     0.65   0.513    -.2805249    .6512642
      elem_m |   -.282394    .130928    -2.16   0.031    -.4978306   -.0669574
      jsec_m |  -2.015192   .7811765    -2.58   0.010    -3.300586   -.7297987
   edumiss_m |  -.2444759    .141943    -1.72   0.085    -.4780372   -.0109145
       rural |    .257322   .1335611     1.93   0.054     .0375528    .4770913
        kmsd |  -.0035291   .0276268    -0.13   0.898    -.0489878    .0419296
   prov_NSUM |   .4171568   .1733759     2.41   0.016      .131874    .7024395
   prov_WSUM |   .4397358   .1774129     2.48   0.013     .1478102    .7316614
   prov_SSUM |   .3504452   .2444573     1.43   0.152    -.0517991    .7526895
   prov_LAMP |    .074863   .2389889     0.31   0.754    -.3183833    .4681094
   prov_JAKA |  -.2361269   .1745009    -1.35   0.176    -.5232609    .0510071
   prov_CJAV |   .1769261   .1233941     1.43   0.152    -.0261138     .379966
   prov_YOGI |  -.0796543   .2392064    -0.33   0.739    -.4732584    .3139499
   prov_EJAV |   -.056005   .1154807    -0.48   0.628    -.2460238    .1340137
   prov_BALI |  -.9146989   .4020874    -2.27   0.023    -1.576317   -.2530808
  prov_WNUSA |  -.4723495   .2686651    -1.76   0.079    -.9144268   -.0302722
  prov_SKALI |  -.2128348   .3679641    -0.58   0.563    -.8183043    .3926348
   prov_SSUL |  -.1932583   .2207267    -0.88   0.381    -.5564549    .1699383
       _cons |   6.193273   .6847162     9.05   0.000     5.066601    7.319945
-------------+----------------------------------------------------------------
beta1-beta0  |
         age |  -.0263664   .0778346    -0.34   0.735    -.1544399    .1017072
        age2 |   .0888445     .09751     0.91   0.362    -.0716042    .2492931
   r_protest |   .0076003   .5045574     0.02   0.988    -.8226279    .8378285
    r_cathol |   1.511966   .9013705     1.68   0.094     .0287986    2.995134
     r_other |   -.475038   .5783082    -0.82   0.411     -1.42662     .476544
      elem_f |   .0435354   .5091902     0.09   0.932    -.7943157    .8813866
      jsec_f |   .7114898   1.057225     0.67   0.501    -1.028129    2.451109
   edumiss_f |  -.8366306   .8745023    -0.96   0.339    -2.275588    .6023264
      elem_m |   .5413133    .325493     1.66   0.096     .0057281    1.076899
      jsec_m |   3.217151    1.20061     2.68   0.007     1.241597    5.192706
   edumiss_m |   .0900733   .3765128     0.24   0.811    -.5294629    .7096095
       rural |  -.2526226   .3035566    -0.83   0.405    -.7521123    .2468671
        kmsd |  -.0046851   .0717574    -0.07   0.948    -.1227589    .1133887
   prov_NSUM |  -.8878807   .3711039    -2.39   0.017    -1.498517   -.2772447
   prov_WSUM |   -.413396   .4207084    -0.98   0.326    -1.105654    .2788621
   prov_SSUM |  -.3041441   .4461876    -0.68   0.496    -1.038327    .4300391
   prov_LAMP |   -.407982   .6705631    -0.61   0.543    -1.511366    .6954016
   prov_JAKA |   .4292202   .3111699     1.38   0.168    -.0827968    .9412373
   prov_CJAV |  -.5671382   .3293601    -1.72   0.085    -1.109087   -.0251899
   prov_YOGI |  -.2345741   .4526054    -0.52   0.604    -.9793174    .5101693
   prov_EJAV |   .1103112   .2721488     0.41   0.685    -.3374983    .5581206
   prov_BALI |   1.443219   .7373255     1.96   0.050     .2299809    2.656458
  prov_WNUSA |   .6206765   .5805962     1.07   0.285    -.3346703    1.576023
  prov_SKALI |   1.106056   .6591907     1.68   0.093      .021385    2.190726
   prov_SSUL |   .4077686    .472223     0.86   0.388    -.3692546    1.184792
       _cons |  -.9642707   2.204342    -0.44   0.662    -4.591423    2.662882
-------------+----------------------------------------------------------------
k            |
          p1 |  -38.76967   24.57107    -1.58   0.115    -79.20035    1.661003
          p2 |   84.33174    51.6404     1.63   0.103    -.6403768    169.3039
          p3 |  -63.52247   36.55783    -1.74   0.082    -123.6768    -3.36809
-------------+----------------------------------------------------------------
effects      |
         ate |   .0252455   .8772829     0.03   0.977    -1.418287    1.468778
         att |   2.913924   1.168671     2.49   0.013     .9909254    4.836923
        atut |  -2.067905   1.845267    -1.12   0.263    -5.104216    .9684048
        late |   .7075882   .4038484     1.75   0.080     .0430725    1.372104
      mprte1 |   .8803193   .6679539     1.32   0.188    -.2187709     1.97941
      mprte2 |   .7759388   .5411928     1.43   0.152    -.1145714    1.666449
      mprte3 |  -.5357128   1.050605    -0.51   0.610    -2.264439    1.193013
------------------------------------------------------------------------------
Test of observable heterogeneity, p-value                               0.0004
Test of essential heterogeneity, p-value                                0.3190
------------------------------------------------------------------------------
Note: Analytical standard errors ignore the facts that the propensity score,
the mean of X and the treatment effect parameter weights are estimated objects
when calculating standard errors. Consider using bootreps() to bootstrap the 
standard errors.

While the above implementation suggests minor differences (in part given that it re-estimates the propensity score in our already-trimmed sample), if we inspect both input models and final graphs, we see very similar results.

Semi-parametric (Local IV) methods

In contrast with the parametric approach we can estimate \(E[Y∣P]\) flexibly and compute the MTE as its local slope. One way to do this is using npregress (non-parametric regression) to run a local linear regression and request the gradient (derivative) with respect to \(P\). Below we do this with default options, noting that our key element of interest here is the non-parametric relationship between the outcome of interest and the propensity score. Given requirements of npregress we include all binary covariates with Stata’s i. syntax, so that these are understood to be discrete.

local covs i.r_protest i.r_cathol i.r_other i.elem_f i.jsec_f   ///
           i.edumiss_f i.elem_m i.jsec_m i.edumiss_m i.rural    ///
           i.prov_NSUM i.prov_WSUM i.prov_SSUM i.prov_LAMP      ///
           i.prov_JAKA i.prov_CJAV i.prov_YOGI i.prov_EJAV      ///
           i.prov_BALI i.prov_WNUSA i.prov_SKALI i.prov_SSUL 

//npregress kernel learnhr00 ps_manual `covs'

Our particular interest here is actually the change in the outcome \(Y\) given a marginal change in \(P\) (i.e. the MTE), and we can compute this quantity at various margins using Stata’s margins command. We do this below, before finally plotting the output with marginsplot. Given the demanding nature of non-parametric estimation, we do this with only 50 bootstraps, though would want to use more replicates for more precise confidence intervals.

//margins, dydx(ps_manual) at(ps_manual=(0.1(0.1)0.9)) reps(5) asbalanced
//marginsplot

The approach taken above estimates the non-parametric relationship between the outcome and the propensity score while also controlling (non-paramtrically) for each other relevant covariate. Alternative approaches which also allow for a non-parametric relationship between \(Y\) and \(P\), after first concentrating out the effects of covariates. Such methods are semi-parametric, in that they allow for a non-parametric relationship between \(Y\) and \(P\) after controlling parametrically for covariates. A discussion of the computational implementation of such methods can be found in Andresen (2018). A precise implementation of this semi-parametric method using the routines from Andresen (2018) is provided in the mtefe command along with the semiparametric option:

mtefe learnhr00 `X' ///
    (dschool = kmsmp INT_* `X'), ///
    link(logit) ///
    semiparametric ///
    kernel(gaussian) ///
    bootreps(50)
(running mtefe_secondstage on estimation sample)

Bootstrap replications (50): .........10.........20.........30.........40......
> ...50 done

Semiparametric MTE model                                 Number of obs = 2,576
                                                         Replications  =    50


Treatment model: Logit
Estimation method: Local IV
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
   learnhr00 | coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
beta0        |
         age |   .0406309   .0333816     1.22   0.224    -.0247958    .1060577
        age2 |  -.0469199   .0422059    -1.11   0.266     -.129642    .0358022
   r_protest |   .3452946   .2584585     1.34   0.182    -.1612747    .8518639
    r_cathol |  -.7275039   .8118318    -0.90   0.370    -2.318665    .8636573
     r_other |   .4063137   .3806562     1.07   0.286    -.3397588    1.152386
      elem_f |   .0706205   .1515167     0.47   0.641    -.2263467    .3675878
      jsec_f |  -.0274365   .5058289    -0.05   0.957    -1.018843    .9639699
   edumiss_f |   .2088889   .3337153     0.63   0.531    -.4451811    .8629589
      elem_m |  -.2445288   .1554019    -1.57   0.116    -.5491109    .0600533
      jsec_m |  -1.582366   .9089933    -1.74   0.082     -3.36396    .1992286
   edumiss_m |   -.215552   .1441118    -1.50   0.135    -.4980059    .0669018
       rural |   .2029153   .1340941     1.51   0.130    -.0599043    .4657349
        kmsd |  -.0036319   .0286946    -0.13   0.899    -.0598722    .0526085
   prov_NSUM |   .3793105   .1138637     3.33   0.001     .1561417    .6024792
   prov_WSUM |   .3867113   .1592487     2.43   0.015     .0745897    .6988329
   prov_SSUM |   .3935735   .2475065     1.59   0.112    -.0915303    .8786772
   prov_LAMP |   .0874089   .2018954     0.43   0.665    -.3082989    .4831167
   prov_JAKA |  -.1994451    .175033    -1.14   0.255    -.5425034    .1436133
   prov_CJAV |   .1505246   .1161712     1.30   0.195    -.0771668    .3782159
   prov_YOGI |   .0082855   .2634731     0.03   0.975    -.5081122    .5246833
   prov_EJAV |  -.0532839   .0886731    -0.60   0.548    -.2270799    .1205121
   prov_BALI |  -.8187862   .4589435    -1.78   0.074    -1.718299    .0807266
  prov_WNUSA |  -.3840848   .2637662    -1.46   0.145    -.9010571    .1328876
  prov_SKALI |  -.0707348   .3777134    -0.19   0.851    -.8110395    .6695698
   prov_SSUL |  -.1461623   .3416223    -0.43   0.669    -.8157297     .523405
-------------+----------------------------------------------------------------
beta1-beta0  |
         age |  -.0579509   .0755002    -0.77   0.443    -.2059284    .0900267
        age2 |   .1273157   .0981574     1.30   0.195    -.0650694    .3197007
   r_protest |  -.3132643   .4304894    -0.73   0.467    -1.157008    .5304795
    r_cathol |   1.054558   1.169281     0.90   0.367    -1.237191    3.346307
     r_other |  -.5541964   .6567413    -0.84   0.399    -1.841386    .7329929
      elem_f |  -.1686865   .4469396    -0.38   0.706    -1.044672     .707299
      jsec_f |   .0330692   .9218807     0.04   0.971    -1.773784    1.839922
   edumiss_f |  -.8999197   .9612083    -0.94   0.349    -2.783853    .9840139
      elem_m |   .3829063   .3556503     1.08   0.282    -.3141554    1.079968
      jsec_m |   2.161741   1.342449     1.61   0.107    -.4694116    4.792893
   edumiss_m |  -.0433961   .4441364    -0.10   0.922    -.9138875    .8270952
       rural |  -.0605399   .2685704    -0.23   0.822    -.5869282    .4658483
        kmsd |    -.00431   .0745807    -0.06   0.954    -.1504855    .1418655
   prov_NSUM |  -.7719926   .2614169    -2.95   0.003     -1.28436   -.2596248
   prov_WSUM |  -.2382162   .4651912    -0.51   0.609    -1.149974    .6735419
   prov_SSUM |  -.4670942   .4270576    -1.09   0.274    -1.304112    .3699233
   prov_LAMP |  -.4528695   .6308583    -0.72   0.473    -1.689329      .78359
   prov_JAKA |   .2853643   .3089664     0.92   0.356    -.3201987    .8909273
   prov_CJAV |  -.4624171   .2511216    -1.84   0.066    -.9546064    .0297723
   prov_YOGI |  -.5430607   .4634112    -1.17   0.241     -1.45133    .3652085
   prov_EJAV |   .1050336    .220411     0.48   0.634     -.326964    .5370312
   prov_BALI |   1.087161   .7676483     1.42   0.157    -.4174018    2.591724
  prov_WNUSA |    .297816   .5218114     0.57   0.568    -.7249156    1.320548
  prov_SKALI |   .6719674   .6847397     0.98   0.326    -.6700977    2.014032
   prov_SSUL |   .2331839   .6980245     0.33   0.738    -1.134919    1.601287
-------------+----------------------------------------------------------------
effects      |
         ate |   .8326253   .8245237     1.01   0.313    -.7834115    2.448662
         att |   1.711699   .6945802     2.46   0.014     .3503471    3.073051
        atut |    .251725   1.373896     0.18   0.855    -2.441061    2.944511
        late |   .9088325   .4712598     1.93   0.054    -.0148197    1.832485
      mprte1 |   1.133963   .6950305     1.63   0.103    -.2282722    2.496197
      mprte2 |   .9871147   .5451854     1.81   0.070     -.081429    2.055658
      mprte3 |   .7733297   .8930291     0.87   0.387    -.9769751    2.523635
------------------------------------------------------------------------------
Test of observable heterogeneity, p-value                               0.0000
Test of essential heterogeneity, p-value                                0.9164
------------------------------------------------------------------------------
Note: Limited support. Regular, non-marginal treatment effect parameters (ATE, 
> ATT,
ATUT, LATE and PRTE) cannot be estimated. Instead, reported parameters are 
rescaled so that the treatment effect parameters weights sum to 1 within suppor
> t.

Consistent with parametric approach, the positive slope of the nonparametric MTE suggests positive selection on gains: those individuals with the largest MTEs are those whose aversion to attending secondary school is lowest.

Policy Relevant Treatment Effects

As discussed in the Book, given the availability of estimated marginal treatment effects, we can use these as building blocks to estimate a large number of quantities of interest. To see a rough idea of this we can consider what our ATEs, ATTs, ATUs as well as a PRTE under a specific alternative policy might look like. We will do this manually to have an idea of the mechanics, though note that more formal ways about how to do this with weighting are used in practice; see Andresen (2018) for a computational discussion. To gain a rough idea of how we can use these MTEs to calculate marginal PRTEs, we essentially can consider the effect of policies which shift certain individuals into treatment. To build intuition for this, consider two stylised policies applied to currently untreated individuals. The first targets those with low propensity scores (\(P \in [0.05, 0.20]\)); i.e. individuals who are relatively willing to enrol (low propensity score, or low aversion to treatment) but currently not enrolled. These are the “easy shifters”: a modest policy change would be enough to tip them into treatment. The second targets individuals with high propensity scores among the untreated (\(P \in [0.55, 0.70]\)) these are “harder shifters”, or more resistant individuals who would only enrol under a strong intervention.

Based on the MTEs we have estimated above, we can consider what this would imply for the individuals in this setting. To illustrate this, we will use the MTEs we have previously calculated based on the parametric approach. If you refer above, you will remember that we generated a file called mte_grid with the marginal treatment effect for each binned propensity score from 0 to 1 in increments of 0.01. Below, we will merge these marginal treatment effects back into the original estimated propensity scores, allowing us to observe, for each individual (and hence propensity score), our estimate of their MTE. Of course, this will be a simple approximation as we are using a coarse grid of propensity scores.

gen _at = round(ps_manual*100)+1
merge m:1 _at using mte_grid

    Result                      Number of obs
    -----------------------------------------
    Not matched                            10
        from master                         0  (_merge==1)
        from using                         10  (_merge==2)

    Matched                             2,576  (_merge==3)
    -----------------------------------------

However, we can now consider the two movements of individuals into treatment we discussed above.

// Consider movement of low treatment resistence
sum _margin if ps_manual>=0.05 & ps_manual<0.2 & dschool==0

// Consider movement of high treatment resistence
sum _margin if ps_manual>=0.55 & ps_manual<0.7 & dschool==0

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     _margin |        461    2.111562     .633703   1.124345   3.316937

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     _margin |        137   -.5360534    .3398917   -1.25747  -.1255389

We can see that in these two cases, the mean treatment effect is very different, with very high positive returns in the first case, and negative returns in the latter case. The contrast between these two quantities illustrates on of the central message of the MTE framework: the return to a policy depends not just on whether it shifts people into treatment, but on who it shifts. Given positive selection on gains such as those estimated here, policies reaching more willing individuals, i.e. those with low resistance, yield higher average returns than those requiring a more intensive intervention.

However, less abstractly, we can consider specific policy interventions, and how they would map into treatment effects. The idea of a PRTE is to consider an alternative policy \(P(Z')\). In this case, imagine an alternative policy in which distances to schools (the instrument considered above) are reduced, presumably via some sort of school construction program. Using the ideas of PRTEs, we can ask what such a movement in terms of the instrument implies, and for which individuals will such a movement be sufficient to shift them into treatment. Concretely, imagine a policy which reduced distance to secondary schooling for each individual by 0.1km. Because the instrument enters the propensity score via the estimated logit, we can translate this distance reduction directly into a counterfactual propensity score \(P'(Z)\) for each individual, and identify those untreated individuals whose counterfactual propensity score exceeds their original one. These are the compliers of the policy, and the PRTE is their average MTE. We do this below, re-estimating our original logit and “mapping” our new policy into a \(P(Z')\).

// Re-estimate logit from above
logit dschool kmsmp INT_* `X'

// Predict original linear index
predict xb_orig_idx, xb

// Counterfactual: move everyone 0.1km closer, floor at zero
gen kmsmp_policy = max(kmsmp - 0.1, 0)

// Generate new prediction, swapping out kmsmp contribution only
gen xb_policy_idx = xb_orig_idx - _b[kmsmp]*kmsmp + _b[kmsmp]*kmsmp_policy

// Counterfactual propensity score
gen ps_policy = invlogit(xb_policy_idx)

// Identify individuals shifted by the policy:
// currently untreated whose counterfactual PS exceeds original PS
gen shifted = (dschool==0 & ps_policy > ps_manual)
tab shifted

// PRTE: average MTE over shifted individuals
sum _margin if shifted==1

Iteration 0:  Log likelihood =  -1752.458  
Iteration 1:  Log likelihood = -1426.2696  
Iteration 2:  Log likelihood = -1422.6476  
Iteration 3:  Log likelihood =  -1422.639  
Iteration 4:  Log likelihood =  -1422.639  

Logistic regression                                     Number of obs =  2,576
                                                        LR chi2(38)   = 659.64
                                                        Prob > chi2   = 0.0000
Log likelihood = -1422.639                              Pseudo R2     = 0.1882

------------------------------------------------------------------------------
     dschool | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       kmsmp |   .0815814   .8332817     0.10   0.922    -1.551621    1.714784
     INT_age |  -.0109681   .0427444    -0.26   0.797    -.0947454    .0728093
    INT_age2 |   .0096453   .0537594     0.18   0.858    -.0957212    .1150117
INT_r_prot~t |  -.0696178   .1922547    -0.36   0.717    -.4464301    .3071945
INT_r_cathol |   .1908234   .1977146     0.97   0.334      -.19669    .5783368
 INT_r_other |   .4884155   .2144269     2.28   0.023     .0681464    .9086845
  INT_elem_f |  -.0732193   .1100646    -0.67   0.506     -.288942    .1425033
  INT_jsec_f |    .153895   .1624098     0.95   0.343    -.1644224    .4722123
INT_edumis~f |   .0007831   .3916459     0.00   0.998    -.7668287    .7683949
  INT_elem_m |  -.0441543   .1051234    -0.42   0.674    -.2501924    .1618837
  INT_jsec_m |   .1120327   .2885884     0.39   0.698    -.4535902    .6776557
INT_edumis~m |  -.1618123   .1634425    -0.99   0.322    -.4821537    .1585291
   INT_rural |   .1426792   .0983747     1.45   0.147    -.0501316      .33549
         age |   .0801179   .0637621     1.26   0.209    -.0448536    .2050893
        age2 |  -.0953405   .0795264    -1.20   0.231    -.2512093    .0605283
   r_protest |   .8035301   .3436278     2.34   0.019     .1300319    1.477028
    r_cathol |   .8444643   .5123735     1.65   0.099    -.1597694    1.848698
     r_other |  -.3034388   .4269792    -0.71   0.477    -1.140303    .5334251
      elem_f |   .8197853   .1732536     4.73   0.000     .4802144    1.159356
      jsec_f |    1.67311   .2392883     6.99   0.000     1.204113    2.142106
   edumiss_f |   .1656225   .4379767     0.38   0.705    -.6927961    1.024041
      elem_m |   .5050857   .1680172     3.01   0.003      .175778    .8343935
      jsec_m |   1.791501   .3304023     5.42   0.000     1.143924    2.439077
   edumiss_m |     .51425   .2256048     2.28   0.023     .0720727    .9564273
       rural |  -.7662924   .1553908    -4.93   0.000    -1.070853    -.461732
        kmsd |   .0014881   .0407576     0.04   0.971    -.0783954    .0813715
   prov_NSUM |  -.2509155   .2282717    -1.10   0.272    -.6983198    .1964889
   prov_WSUM |   -.408247   .2296097    -1.78   0.075    -.8582736    .0417797
   prov_SSUM |   .3941021   .2537412     1.55   0.120    -.1032215    .8914256
   prov_LAMP |   .0433285   .3412342     0.13   0.899    -.6254782    .7121351
   prov_JAKA |   .3242273   .1692587     1.92   0.055    -.0075137    .6559682
   prov_CJAV |  -.3255227   .1762022    -1.85   0.065    -.6708727    .0198273
   prov_YOGI |   .6678609    .203728     3.28   0.001     .2685614     1.06716
   prov_EJAV |  -.0302944   .1636347    -0.19   0.853    -.3510126    .2904238
   prov_BALI |   .7013791    .398643     1.76   0.079    -.0799469    1.482705
  prov_WNUSA |    .843835   .2315181     3.64   0.000     .3900678    1.297602
  prov_SKALI |   .9894311   .2849296     3.47   0.001     .4309793    1.547883
   prov_SSUL |   .4570139   .2675936     1.71   0.088      -.06746    .9814878
       _cons |  -2.854647   1.252999    -2.28   0.023    -5.310481   -.3988139
------------------------------------------------------------------------------
(10 missing values generated)
(10 missing values generated)
(10 missing values generated)

    shifted |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,098       81.13       81.13
          1 |        488       18.87      100.00
------------+-----------------------------------
      Total |      2,586      100.00

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     _margin |        488    1.359188     1.24032  -5.373583   3.316937

The PRTE for the distance instrument identifies the return to schooling for individuals who would change their enrolment decision in response to a modest reduction in distance to their nearest secondary school. Despite the small size of the policy shift, the strong relationship between distance and enrolment in this setting means that a substantial number of currently untreated individuals are moved into treatment, and these compliers exhibit large and positive marginal returns. This suggests that the policy is reaching individuals who, while not currently enrolled, sit in a region of relatively low resistance and high returns, closer to our “low resistance” individuals considered previously than the higher resistence group.

References

Andresen, Martin Eckhoff. 2018. “Exploring Marginal Treatment Effects: Flexible Estimation Using Stata.” The Stata Journal 18 (1): 118–58.
Carneiro, Pedro, James J. Heckman, and Edward J. Vytlacil. 2011. “Estimating Marginal Returns to Education.” American Economic Review 101 (6): 2754–81. https://doi.org/10.1257/aer.101.6.2754.
Carneiro, Pedro, Michael Lokshin, and Nithin Umapathi. 2017. “Average and Marginal Returns to Upper Secondary Schooling in Indonesia.” Journal of Applied Econometrics 32 (1): 16–36. https://doi.org/https://doi.org/10.1002/jae.2523.
Cattaneo, Matias D., Luke Keele, Rocío Titiunik, and Gonzalo Vazquez-Bare. 2021. Extrapolating Treatment Effects in Multi-Cutoff Regression Discontinuity Designs.” Journal of the American Statistical Association 116 (536): 1941–52.
Dehejia, Rajeev H., and Sadek Wahba. 1999. “Causal Effects in Nonexperimental Studies: Reevaluating the Evaluation of Training Programs.” Journal of the American Statistical Association 94 (448): 1053–62. http://www.jstor.org/stable/2669919.
Firpo, Sergio. 2007. “Efficient Semiparametric Estimation of Quantile Treatment Effects.” Econometrica 75 (1): 259–76.
Frölich, Markus, and Blaise Melly. 2010. “Estimation of Quantile Treatment Effects with Stata.” The Stata Journal 10 (3): 423–57.
LaLonde, Robert J. 1986. Evaluating the Econometric Evaluations of Training Programs with Experimental Data.” The American Economic Review 76 (4): 604–20.
Londoño-Vélez, Juliana, Catherine Rodríguez, and and Fabio Sánchez. 2020. Upstream and Downstream Impacts of College Merit-Based Financial Aid for Low-Income Students: Ser Pilo Paga in Colombia.” American Economic Journal: Economic Policy 12 (2): 193–227.