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. Sergio Ocampo & Baxter Robinson, 2024. "Computing Longitudinal Moments for Heterogeneous Agent Models," Computational Economics, Springer;Society for Computational Economics, vol. 64(3), pages 1891-1912, September.
    3. Yang, C.C. & Zhao, Xueya & Zhu, Shenghao, 2023. "Tax progressivity and the Pareto tail of income distributions," Economics Letters, Elsevier, vol. 231(C).
    4. 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.
    5. Timothy Cogley & Thomas J. Sargent & Viktor Tsyrennikov, 2014. "Wealth Dynamics in a Bond Economy with Heterogeneous Beliefs," Economic Journal, Royal Economic Society, vol. 124(575), pages 1-30, March.
    6. 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.
    7. 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.
    8. 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.
    9. 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.
    10. Light, Bar & Weintraub, Gabriel, 2018. "Mean Field Equilibrium: Uniqueness, Existence, and Comparative Statics," Research Papers 3731, Stanford University, Graduate School of Business.
    11. Berriel, Tiago Couto & Zilberman, Eduardo, 2011. "Targeting the poor: a macroeconomic analysis of cash transfer programs," FGV EPGE Economics Working Papers (Ensaios Economicos da EPGE) 726, EPGE Brazilian School of Economics and Finance - FGV EPGE (Brazil).
    12. 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.
    13. Masakatsu Okubo, 2015. "Earnings Dynamics and Profile Heterogeneity: Estimates from Japanese Panel Data," The Japanese Economic Review, Japanese Economic Association, vol. 66(1), pages 112-146, March.
    14. 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.
    15. Juan Carlos Parra-Alvarez & Olaf Posch & Mu-Chun Wang, 2017. "Estimation of Heterogeneous Agent Models: A Likelihood Approach," CESifo Working Paper Series 6717, CESifo.
    16. Terézia Vančová, 2019. "The Excess Smoothness and Sensitivity of Consumption in the V4 Countries," Acta Universitatis Agriculturae et Silviculturae Mendelianae Brunensis, Mendel University Press, vol. 67(6), pages 1653-1663.
    17. 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.
    18. 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.
    19. Adrien Auclert, 2019. "Monetary Policy and the Redistribution Channel," American Economic Review, American Economic Association, vol. 109(6), pages 2333-2367, June.
    20. Bayer, Christian & Rendall, Alan D. & Wälde, Klaus, 2019. "The invariant distribution of wealth and employment status in a small open economy with precautionary savings," Journal of Mathematical Economics, Elsevier, vol. 85(C), pages 17-37.

    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.