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: Matrix manipulation


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Matrix manipulation
Date   Wed, 23 Mar 2011 09:51:48 +0000 (GMT)

--- On Wed, 23/3/11, [email protected] wrote:
> I have a short question working with matrices in Stata (not
> Mata - perhaps would be more advisable):
> 
> I'd like to divide each row by the respective entry in the
> first column of any nxk matrix.

Yes it is very much more advisable to do this in Mata:

*------------- begin example ------------
mata
a = 80, 100, 40 \ 10, -6, 7
c = 80 \ 10
a :/ c
end
*-------------- end example -------------

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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


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