Anna wrote:
I drew a sample on my laptop using the following commands:
set seed 123456789
preserve
keep if iconst==1 /*sampling only construction sites*/
sample 30, count
I run my code on my desktop and I am getting different sites selected.
Any advice how to replicate it?
---------------------------------------------------------
If the datasets on your two computers are sorted differently, different
observations may be sampled. Look at these results:
sysuse auto.dta, clear
set seed 12345
sort weight
sample 10, count
summarize price
sysuse auto.dta, clear
set seed 12345
sort displacement
sample 10, count
summarize price
Hope this helps
Svend
__________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone: +45 8942 6090
Home: +45 8693 7796
Email: [email protected]
__________________________________________
*
* 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/