*! opl_ma_vf, v5, GCerulli, 11aug2025

Title

opl_ma_vf -- Value-function estimation for multi-action Optimal Policy Learning
using Regression Adjustment (RA), Inverse Probability Weighting (IPW), and Doubly Robust (DR) methods. This command uses linear regression for estimating nuisance conditional means.

Syntax

opl_ma_vf depvar indepvars , policy_train(varname) policy_new(varname)

Description

opl_ma_vf estimates the value-function for multi-action Optimal Policy Learning
via three different methods:

1. Regression Adjustment (RA): estimates expected outcomes for each action using regression models.

2. Inverse Probability Weighting (IPW): uses estimated propensity scores to reweigh observations.

3. Doubly Robust (DR): combines RA and IPW for a more robust estimator.

Options

The following options are available:

Option Description

policy_train(varname) Variable indicating the treatment policy used for training.

policy_new(varname) Variable indicating the new policy to be evaluated.

Examples

Example: Basic usage of opl_ma_vf

Generate the initial dataset by simulation:

clear all

set obs 100

set seed 1010

generate A = floor(runiform()*3)

gen x1 = rnormal()

gen x2 = rnormal()

gen y = 100*runiform()

Generate a new policy variable:

gen pi = rpoisson(1)

Estimate the value function for the new policy:

opl_ma_vf y x1 x2 , policy_train(A) policy_new(pi)

Print the return objects:

ereturn list

Estimate the value function for the training policy:

opl_ma_vf y x1 x2 , policy_train(A) policy_new(A)

Print the return objects:

ereturn list

Stored Results

After execution, opl_ma_vf stores the following in e():

Scalars

e(RA) Estimated value-function using Regression Adjustment

e(IPW) Estimated value-function using Inverse Probability Weighting

e(DR) Estimated value-function using Doubly Robust method

References

Athey, S., and Wager S. 2021. Policy Learning with Observational Data, Econometrica, 89, 1, 133–161.

Cerulli, G. 2021. Improving econometric prediction by machine learning, Applied Economics Letters, 28, 16, 1419-1425.

Cerulli, G. 2022. Optimal treatment assignment of a threshold-based policy: empirical protocol and related issues, Applied Economics Letters, 30, 8, 1010-1017.

Cerulli, G. 2023. Fundamentals of Supervised Machine Learning: With Applications in Python, R, and Stata, Springer, 2023.

Cerulli, G. 2024. Optimal policy learning with observational data in multi-action scenarios: Estimation, risk preference, and potential failures. arXiv preprint, arXiv:2403.20250. https://arxiv.org/abs/2403.20250.

Cerulli, G. 2025. Optimal policy learning using Stata. The Stata Journal, 25, 2, 309-343.

Gareth, J., Witten, D., Hastie, D.T., Tibshirani, R. 2013. An Introduction to Statistical Learning : with Applications in R. New York, Springer.

Kennedy, E. H. 2023. Towards optimal doubly robust estimation of heterogeneous causal effects. Electronic Journal of Statistics, 17, 2, 3008-3049.

Kitagawa, T., and A. Tetenov. 2018. Who Should Be Treated? Empirical Welfare Maximization Methods for Treatment Choice, Econometrica, 86, 2, 591–616.

Kunzel, S. R., Sekhon, J. S., Bickel, P. J., Yu, B. (2019). Metalearners for estimating heterogeneous treatment effects using machine learning.
Proceedings of the National Academy of Sciences of the United States of America, 116, 10, 4156-4165.

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_ma_fb, make_cate, opl_tb, opl_lc, opl_lc_c, opl_dt, opl_dt_c