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

st: randomly assign btw datasets

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


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.


* For searches and help try:

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