Statalist The Stata Listserver


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

st: New (re)sampling Mata functions available in -moremata- on SSC


From   "Ben Jann" <[email protected]>
To   <[email protected]>
Subject   st: New (re)sampling Mata functions available in -moremata- on SSC
Date   Fri, 7 Apr 2006 22:32:13 +0200

The -moremata- package, available from the SSC Archive, now
provides sampling functions. The functions may be used, for 
example, to implement resampling techniques in Mata.

The most important of the new functions is called 
-mm_sample()-. It covers a variety of sampling methods:

 o simple random sampling (SRS)
 o unequal probability sampling (UPS) / sampling with 
   probabilities proportional to size (PPS)
 o sampling with replacement
 o sampling without replacement
 o stratified sampling
 o cluster sampling

Results are returned as a permutation vector or, optionally, 
as a vector containing sampling frequencies.

Furthermore, -moremata- contains functions, which provide 
the basic sampling algorithms used by -mm_sample()-. These
functions are:

 o mm_srswr(): simple random sampling with replacement
 o mm_srswor(): simple random sampling without replacement
 o mm_upswr(): unequal probability sampling with replacement
 o mm_upswor(): unequal probability sampling without replacement 

Type

 . ssc install moremata, replace

to install the new functions.

ben


*
*   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