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 references with column names
From
David Kantor <[email protected]>
To
[email protected]
Subject
Re: st: matrix references with column names
Date
Tue, 17 Sep 2013 15:53:24 -0400
Hi Stas,
Thanks so much!
--David
At 02:53 PM 9/17/2013, you wrote:
You can get the row/column numbers with colnumb(b,"age") and
rownumb(b,"age") functions. The code looks cumbersome, but it works.
You can break this down for readability into
local whereagecol = colnumb(b,"age")
local whereagerow = colnumb(b,"age")
disp b[`whereagerow',`whereagecol']
-- Stas Kolenikov, PhD, PStat (ASA, SSC)
-- Senior Survey Statistician, Abt SRBI
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
-- http://stas.kolenikov.name
[...]
*
* 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/