Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: randomly assign btw datasets


From   "Aaron Li" <[email protected]>
To   [email protected]
Subject   st: randomly assign btw datasets
Date   Sat, 08 Oct 2005 20:19:08 +0000

Hi,

I want to generate a random sample of combinations between a group of firms (#=100,000) and a list of industry SICs (#=50) (in two datasets). I could use cross to generate all possible combinations and then random sample. Because the resulting dataset would be huge, I decide to do it another way: random sample the # of firms (say, 30,000), and then randomly assign one SIC to each sampled firm. How can I do it? Thanks for your help.

AL


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index