Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Dividing column vectors by row numbers


From   njcoxstata@gmail.com
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Dividing column vectors by row numbers
Date   Wed, 19 Jun 2013 16:53:22 +0100

Mata has operators such as :/ to make this easy. Stata is typically more challenging in this regard.

Nick
njcoxstata@gmail.com

On 19 Jun 2013, at 16:43, "G. Anderson" <ga274@cam.ac.uk> wrote:
> 
> Is it possible using Stata matrices (or Mata) to do element by element operations based on the row number of that element. For example, if I have a column vector, is there a simple way to divide each element by the row number?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index