help opl_fb_cba

Title

opl_fb_cba - First-best cost-benefit analysis and policy-score frontier

Syntax

opl_fb_cba tauvar [if] [in],
cost(varname)
[lambda(#)
nquantiles(#)
generate(name)
frame(name)
saving(filename)
grsize(#)
graph
replace]

where tauvar contains estimated individual treatment effects, such as
estimated CATEs or IATEs, and varname in cost() contains
individual treatment costs.

Description

opl_fb_cba performs a first-best cost-benefit analysis using estimated
individual treatment effects and individual treatment costs.

For each observation, the command constructs the policy score

s_i = tau_i - lambda c_i,

where tau_i is the estimated treatment effect, c_i is the
individual treatment cost, and lambda is a user-specified cost-weight
parameter.

The first-best policy assigns treatment whenever the policy score is positive:

pi_i^ = 1(tau_i - lambda c_i > 0).

The command also evaluates a sequence of quantile-based policies obtained by
applying progressively higher cutoffs to the policy score. These policies form
a policy-score frontier that summarizes the relationship among treatment
coverage, total treatment benefit, average treatment effect on the treated,
treatment cost, weighted welfare, and net benefit.

The first-best policy is generated in the current dataset. Frontier results are
stored in a separate frame and may optionally be saved as a Stata dataset and
displayed graphically.

Options

cost(varname) specifies the variable containing
nonnegative individual treatment costs. This option is required.

lambda(#) specifies the weight attached to treatment costs
in the policy score. # must lie between 0 and 1. The default is
lambda(1).

nquantiles(#) specifies the number of quantile groups used
to construct the policy-score frontier. The command evaluates the first-best
policy and #-1 quantile-based policies. # must be at least 2 and
cannot exceed the number of valid observations. The default is
nquantiles(20).

generate(name) specifies the name of the generated
first-best policy variable. The default is policy_fb.

frame(name) specifies the name of the frame containing the
frontier results. The default is policy_frontier.

saving(filename) saves the frontier frame as a Stata
dataset.

grsize(#) controls the scale of the combined graph produced
by graph. The default is grsize(0.7).

graph displays the policy-score frontier. The combined graph contains
the benefit-coverage, ATET-coverage, cost-coverage, welfare-coverage, and
net-benefit-coverage frontiers.

replace allows an existing generated policy variable, frontier frame,
or saved dataset to be replaced.

Measures reported

For the first-best policy and for each quantile-based policy, the command
computes the following quantities:

Ntreat is the number of treated observations.

coverage is the percentage of valid observations assigned to treatment.

ATET is the average estimated treatment effect among treated
observations.

TTET is the sum of estimated treatment effects among treated
observations.

ATEPOP is the total treatment effect divided by the number of valid
observations.

avg_cost and total_cost are the average and total treatment costs
among treated observations.

net_benefit is defined as

TTET - total cost.

welfare is the objective used to construct the first-best policy:

TTET - lambda x total cost.

bc_ratio is the ratio of total treatment benefit to total treatment
cost.

Frontier frame

The frame specified in frame() contains one observation for the
first-best policy and one observation for each quantile-based policy. It
contains the following variables:

quantile percentile used to define the score cutoff

cutoff policy-score cutoff

first_best indicator for the first-best policy

Ntreat number treated

coverage percentage treated

ATET average estimated treatment effect among treated

TTET total treatment benefit

ATEPOP average treatment effect in the population

avg_cost average treatment cost

total_cost total treatment cost

net_benefit TTET minus total cost

welfare TTET minus lambda times total cost

bc_ratio benefit-cost ratio

Stored results

opl_fb_cba is rclass and stores the following results:

r(N) number of valid observations

r(Ntreat) number treated under the first-best policy

r(coverage) percentage treated under the first-best policy

r(ATET) average estimated treatment effect among treated

r(TTET) total treatment effect among treated

r(ATEPOP) total treatment effect divided by the estimation sample size

r(avg_cost) average treatment cost among treated

r(total_cost) total treatment cost

r(net_benefit) TTET minus total cost

r(welfare) TTET minus lambda times total cost

r(bc_ratio) benefit-cost ratio

r(lambda) cost-weight parameter

r(nquantiles) number of quantile groups

r(policy) name of the generated policy variable

r(frame) name of the frontier frame

Remarks

The command assumes that estimated individual treatment effects have already
been obtained. They may be produced using cate, make_cate, or
another valid CATE estimator.

The quantity stored in tauvar should represent the estimated causal
benefit used by the decision rule. The command does not estimate treatment
effects internally.

opl_fb_cba does not impose an explicit budget constraint. It computes
the unconstrained first-best policy associated with the selected value of
lambda() and traces alternative policies obtained by tightening the
cutoff on the policy score.

Because treatment effects and costs must be expressed on compatible scales,
the interpretation of lambda() depends on the units of tauvar and
cost().

Example

Load the example dataset, define the cost-weight parameter, and compute the
first-best policy and policy-score frontier:

sysuse data_opl_fb_cba, clear

local lambda = 0.60

opl_fb_cba tau, cost(cost) lambda(`lambda') nquantiles(40) generate(policy_fb) saving(policy_frontier.dta) frame(frontier) grsize(0.6) graph replace

Inspect the first-best results returned in r():

return list

Open the frontier frame:

frame change frontier

Return to the default frame:

frame change default

Acknowledgment

The development of this software was supported by FOSSR (Fostering Open
Science in Social Science Research), a project funded by the European Union -
NextGenerationEU under the NPRR Grant agreement n. MURIR0000008.

Author

Giovanni Cerulli

IRCrES-CNR

Research Institute for Sustainable Economic Growth,
National Research Council of Italy

E-mail: giovanni.cerulli@cnr.it

Also see

Online: opl