Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: problem with -el- matrix function


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: problem with -el- matrix function
Date   Sat, 5 Aug 2006 08:18:24 +0100 (BST)

--- Zurab Sajaia <[email protected]> wrote:
> writing local a=el(e(b),1,1) does not work, although matrix
> A=el(e(b),1,1) does. 

Zurab:
Several ways to make this work exist:
tempname a
scalar `a' = el(e(b),1,1)

or:
local a = _b[whatever the name of the first variable is]

or:
local vars: colnames(e(b))
tokenize `vars'
local a = _b[`1']

And I am sure others can think of even more elegant solutions.

HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


		
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" � The Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index