Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Sample size assignment


From   "Fan, Shihe" <ShiheFan@cha.ab.ca>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Sample size assignment
Date   Fri, 29 Sep 2006 15:05:33 -0600

Hi, everyone,

Could any one help me out on the following problem of producing a list
of random numbers for random assignment to groups? 

I want to produce a list of random numbers (total sample size =1000) for
random assignment to subgroups as listed below. How should I code this
in STATA (run Graziano and Raulin's random number generator program
repeatedly will achieve this. But it will be tedious because my real
problem is much bigger than this dummy problem)

Group  sub-group	sample
1	1		x
1	2		x
1	3		x
1	4		x
1	5		x
2	1		x
2	2		x
2	3		x
2	4		x
2	5		x
...
5	1		x
5	2		x
5	3		x
5	4		x
5	5		x

Total			1000


The xs are random numbers.



Thank you,


Shihe Fan
Epidemiologist
Office of the MOH
Public Health Division
Suite 300, 10216 - 124 Street
Edmonton AB T5N 4A3		
Phone:(780) 413-7742
Fax: 	(780) 413-7950		
shihefan@cha.ab.ca

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index