IDEAS home Printed from https://ideas.repec.org/a/kap/compec/v64y2024i2d10.1007_s10614-023-10472-6.html
   My bibliography  Save this article

Computing Quantiles of Functions of the Agent Distribution Using t-Digests

Author

Listed:
  • Robert Kirkby

    (Victoria University of Wellington)

Abstract

We introduce t-Digests as an accurate and computationally efficient way to calculate the quantiles of functions of the agent distribution for models in which the full distribution is too large to work with directly; e.g., to calculate the Top 1% of the wealth distribution. When it is possible to fit the entire agent distribution (and a function evaluation on it) into memory, the quantiles can easily be calculated directly. Evaluating a function on the agent distribution can be done much faster using a GPU, however this frequently introduces a memory bottleneck as GPU memory is typically an order of magnitude smaller than CPU memory. For Heterogeneous Agent models the full distribution of agents may fit in CPU memory, but not in GPU memory. We partition the agent distribution into (non-overlapping) subspaces and because these subspaces are much smaller we can fit the subspaces in GPU memory one at a time. For each subspace we then evaluate the function and calculate a t-Digest. t-Digests are a form of data structure that are fast to compute, require less memory, and provide high accuracy for the quantiles of the distribution; t-Digests are a ’sketch’ of the subspace. Having computed and stored a t-Digest for each subspace we can then merge them to get a t-Digest for the full agent distribution. The resulting t-Digest is an accurate representation of the quantiles and can form the basis of Lorenz Curves as well as many other distributional and inequality statistics of interest in Economics.

Suggested Citation

  • Robert Kirkby, 2024. "Computing Quantiles of Functions of the Agent Distribution Using t-Digests," Computational Economics, Springer;Society for Computational Economics, vol. 64(2), pages 1199-1218, August.
  • Handle: RePEc:kap:compec:v:64:y:2024:i:2:d:10.1007_s10614-023-10472-6
    DOI: 10.1007/s10614-023-10472-6
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1007/s10614-023-10472-6
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1007/s10614-023-10472-6?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Aldrich, Eric M. & Fernández-Villaverde, Jesús & Ronald Gallant, A. & Rubio-Ramírez, Juan F., 2011. "Tapping the supercomputer under your desk: Solving dynamic equilibrium models with graphics processors," Journal of Economic Dynamics and Control, Elsevier, vol. 35(3), pages 386-393, March.
    2. Jonathan Heathcote & Kjetil Storesletten & Giovanni L. Violante, 2009. "Quantitative Macroeconomics with Heterogeneous Households," Annual Review of Economics, Annual Reviews, vol. 1(1), pages 319-354, May.
    3. Émilien Gouin‐Bonenfant & Alexis Akira Toda, 2023. "Pareto extrapolation: An analytical framework for studying tail inequality," Quantitative Economics, Econometric Society, vol. 14(1), pages 201-233, January.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Robert Kirkby Author-Email: robertkirkby@gmail.com|, 2017. "Convergence of Discretized Value Function Iteration," Computational Economics, Springer;Society for Computational Economics, vol. 49(1), pages 117-153, January.
    2. Yang, C.C. & Zhao, Xueya & Zhu, Shenghao, 2023. "Tax progressivity and the Pareto tail of income distributions," Economics Letters, Elsevier, vol. 231(C).
    3. Jochen Mankart & Rigas Oikonomou, 2017. "Household Search and the Aggregate Labour Market," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 84(4), pages 1735-1788.
    4. Richard M. H. Suen, 2014. "Time Preference And The Distributions Of Wealth And Income," Economic Inquiry, Western Economic Association International, vol. 52(1), pages 364-381, January.
    5. Röhrs, Sigrid & Winter, Christoph, 2017. "Reducing government debt in the presence of inequality," Journal of Economic Dynamics and Control, Elsevier, vol. 82(C), pages 1-20.
    6. Felicia Ionescu, 2011. "Risky Human Capital and Alternative Bankruptcy Regimes for Student Loans," Journal of Human Capital, University of Chicago Press, vol. 5(2), pages 153-206.
    7. Don Schlagenhauf & Bryan Noeth & Carlos Garriga, 2015. "Aggregate and Distributional Dynamics of Consumer Credit in the U. S," 2015 Meeting Papers 1095, Society for Economic Dynamics.
    8. Andrew Foerster & Juan F. Rubio‐Ramírez & Daniel F. Waggoner & Tao Zha, 2016. "Perturbation methods for Markov‐switching dynamic stochastic general equilibrium models," Quantitative Economics, Econometric Society, vol. 7(2), pages 637-669, July.
    9. Emily Anderson & Atsushi Inoue & Barbara Rossi, 2016. "Heterogeneous Consumers and Fiscal Policy Shocks," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 48(8), pages 1877-1888, December.
    10. Franziska Piontek & Matthias Kalkuhl & Elmar Kriegler & Anselm Schultes & Marian Leimbach & Ottmar Edenhofer & Nico Bauer, 2019. "Economic Growth Effects of Alternative Climate Change Impact Channels in Economic Modeling," Environmental & Resource Economics, Springer;European Association of Environmental and Resource Economists, vol. 73(4), pages 1357-1385, August.
    11. Adrien Auclert, 2019. "Monetary Policy and the Redistribution Channel," American Economic Review, American Economic Association, vol. 109(6), pages 2333-2367, June.
    12. Oh, Hyunseung & Reis, Ricardo, 2012. "Targeted transfers and the fiscal response to the great recession," Journal of Monetary Economics, Elsevier, vol. 59(S), pages 50-64.
    13. Lopez-Daneri, Martin, 2016. "NIT picking: The macroeconomic effects of a Negative Income Tax," Journal of Economic Dynamics and Control, Elsevier, vol. 68(C), pages 1-16.
    14. Vanda Almeida, 2020. "Income Inequality and Redistribution in the Aftermath of the 2007-2008 Crisis: The U.S. Case," National Tax Journal, National Tax Association;National Tax Journal, vol. 73(1), pages 77-114, March.
    15. repec:spo:wpecon:info:hdl:2441/4f4eu80n0h8r28g6dadlk02mtb is not listed on IDEAS
    16. Nils M. Gornemann & Keith Kuester & Makoto Nakajima, 2012. "Monetary policy with heterogeneous agents," Working Papers 12-21, Federal Reserve Bank of Philadelphia.
    17. Krueger, D. & Mitman, K. & Perri, F., 2016. "Macroeconomics and Household Heterogeneity," Handbook of Macroeconomics, in: J. B. Taylor & Harald Uhlig (ed.), Handbook of Macroeconomics, edition 1, volume 2, chapter 0, pages 843-921, Elsevier.
    18. , Stone Center & Ranaldi, Marco, 2020. "Distributional Aspects of Economic Systems," SocArXiv n7wj4, Center for Open Science.
    19. Pedro Gete, 2015. "Housing demands, savings gluts and current account dynamics," Globalization Institute Working Papers 221, Federal Reserve Bank of Dallas.
    20. Kai Liu, 2010. "Wage Risk, On-the-job Search and Partial Insurance," 2010 Meeting Papers 1136, Society for Economic Dynamics.
    21. Piero Gottardi & Atsushi Kajii & Tomoyuki Nakajima, 2015. "Optimal Taxation and Debt with Uninsurable Risks to Human Capital Accumulation," American Economic Review, American Economic Association, vol. 105(11), pages 3443-3470, November.

    More about this item

    Keywords

    Agent distribution; Quantiles; Lorenz curve; t-Digest;
    All these keywords.

    JEL classification:

    • E0 - Macroeconomics and Monetary Economics - - General

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:kap:compec:v:64:y:2024:i:2:d:10.1007_s10614-023-10472-6. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.