Statalist


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

st: Update to -moremata- available from SSC


From   "Ben Jann" <[email protected]>
To   statalist <[email protected]>
Subject   st: Update to -moremata- available from SSC
Date   Thu, 13 Mar 2008 00:24:07 +0100

Thanks to Kit Baum, an update to the -moremata- package is available
from the SSC Archive.

-moremata- provides various Mata add-ons.

To install the update, type

 . ssc install moremata, replace

or use the -adoupdate- command.

The update adds a new function called -mm_cond()-, which extends
Mata's conditional operator to work with matrices.

For example the syntax

: x = (a ? b : c)

only works with a, b, and c being scalar. You can use -mm_cond()- to
relax this restriction and type

 : x = mm_cond(a, b, c)

The arguments can now be matrices and a matrix containing
element-by-element evaluations is returned. The input matrices may
even have different dimensions (as long as they are "r-conformable").

Cheers,
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