IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v11y2011i2p299-304.html
   My bibliography  Save this article

Generating random samples from user-defined distributions

Author

Listed:
  • Katarına Lukacsy

    (Central European University)

Abstract

Generating random samples in Stata is very straightforward if the distribution drawn from is uniform or normal. With any other distribution, an inverse method can be used; but even in this case, the user is limited to the built- in functions. For any other distribution functions, their inverse must be derived analytically or numerical methods must be used if analytical derivation of the inverse function is tedious or impossible. In this article, I introduce a command that generates a random sample from any user-specified distribution function using numeric methods that make this command very generic.

Suggested Citation

  • Katarına Lukacsy, 2011. "Generating random samples from user-defined distributions," Stata Journal, StataCorp LP, vol. 11(2), pages 299-304, June.
  • Handle: RePEc:tsj:stataj:v:11:y:2011:i:2:p:299-304
    Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj11-2/st0229/
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=st0229
    File Function: link to article purchase
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Athanassios N. Avramidis & James R. Wilson, 1994. "A Flexible Method for Estimating Inverse Distribution Functions in Simulation Experiments," INFORMS Journal on Computing, INFORMS, vol. 6(4), pages 342-355, November.
    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. Vincenzo Verardi & Alice McCathie, 2012. "The S-estimator of multivariate location and scatter in Stata," Stata Journal, StataCorp LP, vol. 12(2), pages 299-307, June.
    2. Michael E. Kuhl & Sachin G. Sumant & James R. Wilson, 2006. "An Automated Multiresolution Procedure for Modeling Complex Arrival Processes," INFORMS Journal on Computing, INFORMS, vol. 18(1), pages 3-18, February.

    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:tsj:stataj:v:11:y:2011:i:2:p:299-304. 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: Christopher F. Baum or Lisa Gilmore (email available below). General contact details of provider: http://www.stata-journal.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.