Learn R Programming

LSDirf (version 0.1.3)

LSDirf-package: tools:::Rd_package_title("LSDirf")

Description

tools:::Rd_package_description("LSDirf")

Arguments

Author

tools:::Rd_package_author("LSDirf")

Maintainer: tools:::Rd_package_maintainer("LSDirf")

Details

The Counterfactual Monte Carlo (CMC) methodology (see note below) is based on the analysis of samples of seed-specific impulse-response functions (IRF's) and cumulative impulse-response functions (CIRF's) of size N. These samples are highly informative about the effects of a shock affecting a simulation running in LSD, with several statistics of interest that can be computed from them.

In particular, assuming that the mean or the median is chosen as the metric to synthesize information included in these samples, robust IRF and CIRF may be obtained by properly combining the N seed-specific IRF's and CIRF's across the different time horizons. These measures represent the mean/median dynamic effect of a designated shock. Confidence intervals can be obtained by bootstrap, thus allowing the analysis of the uncertainty around these effects.

The CMC methodology allows going beyond the linear effects. Eventual state-dependent effects of the shock can be investigated starting from the IRF and CIRF samples, exploiting the heterogeneity in the simulated system conditions of different runs of the CMC experiment.

In particular, in line with the threshold local projections models adopted in several empirical analyses (e.g., Ramey and Zubairy, 2018), the runs of the CMC experiment can be split into alternative states by comparing the value of one or more state variable with a (some) specific threshold(s), computed from the realizations of selected variables' time series in the periods before the shock. As in the case of linear estimates, the confidence intervals around these impulse responses can be constructed via bootstrap, which in this case are also very useful to visually assess the significance of any differences in the impulse responses between alternative states. Several standard statistical tests, such as the t-test or the Mann-Whitney U test, can then be applied to better investigate the significance of state-dependent results.

Such state-dependent analysis can be potentially conducted in two ways. The first is by testing the results against a set of relevant and distinctive system states known to the researcher (e.g., Auerbach and Gorodnichenko, 2013). The second takes the alternative approach: instead of testing whether specific states significantly impact the effect of the shock, try to find such states from simulated data. A similar target, for example, is at the heart of the recent literature on optimal policy, which goal is to find the optimal allocation of the treatment across heterogeneous units (e.g., Kitagawa and Tetenov, 2018; Athey and Wager, 2021). We offer a data-driven heuristic to this aim that helps discover such states. It is named Random Forest State Identification Algorithm (RFSIA) as it adapts the random forest machine learning technique to our goal.

The main intuition behind the RFSIA is to use a random forest classifier to obtain a set of meaningful data stratifications to test for state dependency. More precisely, the idea is to test the state dependency in the final nodes of the regression trees produced by the algorithm and then recombine and rearrange this extremely detailed information to obtain a more general sense of which states have a significant impact on the effect of the shock. In particular, to make the output more understandable and bring out the more evident state patterns, the last step of RFSIA is the quantile discretization of the system states. To this aim, we divide each state variable into deciles and replace the threshold values entering each state, and grouping of similar states.

More details on the methodology, and a comprehensive application to a full LSD simulation model, can be found in Amendola and Pereira (2024).

References

LSD documentation is available at <https://www.labsimdev.org/>

The latest LSD binaries and source code can be downloaded at <https://github.com/SantannaKS/Lsd/>.

Amendola, M., Pereira, M. C. (2024) Linear and state-dependent impulse responses in agent-based models: a new methodology and an economic application. SSRN pre-print <doi:10.2139/ssrn.4740360>. Available at <https://www.ssrn.com/abstract=4740360>.

Athey S., Wager, S. (2021) Policy learning with observational data. Econometrica 89(1):133-161

Auerbach A., Gorodnichenko, Y. (2013) Fiscal multipliers in recession and expansion. Fiscal Policy After the Financial Crisis, edited by Alberto Alesina and Francesco Giavazzi. University of Chicago Press

Kitagawa, T., Tetenov, A. (2018) Who should be treated? empirical welfare maximization methods for treatment choice. Econometrica 86(2):591-616

Ramey, V., Zubairy, S. (2018) Government spending multipliers in good times and in bad: evidence from us historical data. Journal of political economy 126(2):850-901

See Also

LSDinterface-package, LSDsensitivity-package