Dear listers
I would like to ask that how can we random sampling our dataset more than _n or _N. I think we have to write a program to repeat more times instead. I never write any program before, I also have tried it but it did not work out(it only sampling 1 data and finish) so I would be very appreciate if you could help me. Below is my program;
program define sam1 /* e region Nk: to sampling e(1-841) by region(1-19) no.Nk in each region (more than no. of e in each region) */
local t=1
while `t'<=19{
local i=1
while `i'<=`3'{
keep if region==`t'
sample 1, count
local i=`i'+1
}
local t =`t'+1
}
end
Thank you,
P.Chakkrit
Tokyo, Japan
*
* 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/