Statalist The Stata Listserver

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

st: Major update to -moremata- on SSC

From   "Ben Jann" <>
To   <>
Subject   st: Major update to -moremata- on SSC
Date   Fri, 7 Apr 2006 22:26:49 +0200

Thanks to Kit Baum, a new version of the -moremata- 
package is available from the SSC Archive. 

If an older version of -moremata- is already installed 
on your system, it may be advisable to remove it typing

 . ado uninstall moremata
Then type

 . ssc install moremata, replace

to install the update. Installation instructions for
people without direct access to the SSC Archive from
within Stata can be found below.

-moremata- is a collection of various Mata functions. 
The changes are:

 o Functions renamed

   To prevent name conflicts, all -moremata- functions  
   are now prefixed by "mm_". For example, the former
   -quantile()- function is now called -mm_quantile()-. 
   Similarly -insheet()- is now -mm_insheet()-, etc.

   As a consequence of the renaming of the -moremata- 
   functions, the -kdens- package and the -valuesof-
   package, which make use of -moremata-, have also
   changed. See folowing messages.

 o New sampling functions

   -moremata- now contains sampling functions. This is 
   particularly useful for the implementation of 
   replication techniques in Mata. The new -moremata- 
   sampling functions will be described in more detail 
   in a following message.

 o New -mm_panels()- function

   -mm_panels()- counts "panels" and "sub-panels" in 
   the data. -mm_panels()- is a helper tool for the 
   implementation of stratified cluster sampling. 

 o Improved -mm_outsheet()-, -mm_insheet()-, and 

   The -mm_outsheet()- function now has and "append" 
   and a "replace" option. Furthermore, the speed of 
   -mm_insheet()- and -mm_infile()- has been much 
   improved, and the functions now support reading a 
   specific range of the file. 

 o New -mm_freq()- function

   -mm_freq()- returns the frequency counts of the 
   "levels" (distinct values) of a data vector. That 
   is, -mm_freq()- computes the frequency distribution.

 o New -mm_cut()- function

   -mm_cut()- may be used to categorize the values of
    a data vector according to supplied cutting points.

 o New -mm_posof()- function

   -mm_posof(<haystack>, <needle>)- returns the position 
   of element <needle> in vector <haystack>, or 0 if 
   <needle> does not occur.

 o New functions: -mm_unorder2()-, -mm_jumble2()-, and 

   Official -unorder()-, -jumble()- and -_jumble()- 
   may return irreproducible results if n is very large. 
   -mm_unorder2()-, -mm_jumble2()- and -mm__jumble2()- 
   are improved version of these functions producing more 
   stable results.

 o New functions: -mm_rbinomial()- and -mm_cebinomial()-

   -mm_rbinomial()- generates binomial distributed random 
   numbers. -mm_cebinomial()- returns the expected value 
   of a truncated binomial random variable.

 o The code of -mm_relrank()- and -mm_ecdf()- has been 
   slightly improved.

Installation instructions for people *without* direct 
access to the SSC Archive from within Stata:

1. Download "" from

2. Unzip "" into a temporary directory on 
   your hard disk (e.g. c:\temp).

3. Start Stata and type -net from c:\temp- or wherever 
   you unzipped the files.

4. Type -net install moremata, replace-.


*   For searches and help try:

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