Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: -matamatrix- program available on SSC


From   tshmak <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: -matamatrix- program available on SSC
Date   Fri, 7 Jun 2013 09:31:44 +0800

Hi Sergiy, 

-matamatrix- is simply a shortcut to avoid having to invoke mata to do your calculations. (-matamatrix- invokes it for you.) This can make your codes look neater. It also avoids me having to type multiple lines of codes every time I want to do a simple calculation on a matrix, especially e(b) or e(V). 

However, as it says in the help file, you cannot combine Stata and Mata matrices in a call to -matamatrix-. In your example, there's nothing that -matamatrix- can do that standard -matrix- cannot. But you can do things like: 

matamatrix B = exp(A[1,]) :- 1

HTH,

Tim



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Sergiy Radyakin
Sent: 07 June 2013 00:02
To: [email protected]
Subject: Re: st: -matamatrix- program available on SSC

Dear Timothy,
could you please elaborate what does it do in comparison to standard
st_matrix()?
Thank you, Sergiy

matrix A=1,2\3,4

mata
  st_matrix("A")
  B=2,3\5,8
  B
  C=st_matrix("A")*B
  C
end

On Wed, Jun 5, 2013 at 9:59 PM, tshmak <[email protected]> wrote:
> <>
> Thanks to Kit Baum, a program called -matamatrix- is available on SSC. It allows one to perform mata matrix manipulation and functions on Stata matrices.
>
> Enjoy!
>
> Timothy Mak
> School of Public Health
> The University of Hong Kong
>
> Tel 852 2819 9914
> Fax 852 2855 9528
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index