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: list x matrix
From
Scott Merryman <[email protected]>
To
[email protected]
Subject
Re: st: list x matrix
Date
Sat, 27 Mar 2010 18:30:33 -0500
On Sat, Mar 27, 2010 at 3:56 PM, richard boylan <[email protected]> wrote:
> I had thought of doing that, but was wondering if there was a more
> direct way of doing that.
You could reference the matrix cells in a -gen- statement:
. sysuse auto
(1978 Automobile Data)
. matrix b = 1 ,2,3
. gen z = b[1,1] + mpg*b[1,2] + price*b[1,3]
Scott
*
* 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/