Statalist


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

st: RE: function evaluator program


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: function evaluator program
Date   Fri, 5 Feb 2010 12:12:40 -0000

In addition to other good advice, it appears that two distinct features
are being conflated here. 

1. You can give scalars any appropriate name, but then the problem to be
aware of is that scalars and variables share the same namespace. 

2. Thus it is a good idea to use tempnames for scalars, which otherwise
is often good practice to keep scalars strictly within the programs in
which they used. 

Thus you don't _need_ to dereference scalars; rather if you decide to
use tempnames you _need_ to use the corresponding syntax. 

Nick 
[email protected] 

Nelson, Carl

I am writing a function evaluator program to estimate a generalized
McFadden
profit function with convexity imposed using nlsur. As I have been
writing
this the question arose why scalars must be dereferenced like local
macros.
I assume it is because of the functional evaluator program. But I can't
find any documentation of function evaluator programs. I am writing to
ask
if someone can direct me to references that would improve my
understanding
of this issue.

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



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