Statalist The Stata Listserver


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

Re: st: Using scalars when defining matrices


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: Using scalars when defining matrices
Date   Sat, 09 Dec 2006 00:42:31 +0900

Rachel wrote:

Thanks for all your replies.  I have tried several solutions,
including using local variables, but nothing has worked.  The relevant
lines of my ado file are as follows:

1:arg {other vars} abc
2: tempname beta BigMat
3 scalar `beta'=exp(`abc')
4 matrix input `BigMat'=(1,`scalar(beta)'\`scalar(beta)',`scalar(beta)')

. . .

I took the wrong trace message.  The relevant one is:

"= matrix __00001A=(1,,\ ,,)

so it's obviously not recognizing `scalar(beta').

--------------------------------------------------------------------------------

Try scalar(`beta') instead of `scalar(beta').

Joseh Coveney


*
*   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