Statalist


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

st: RE: RE: function evaluator program


From   "Nelson, Carl" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: RE: function evaluator program
Date   Fri, 5 Feb 2010 06:39:11 -0600

Nick (and Maarten):

Thank you for your help with my function evaluator question. I will definitely read up about tempnames and scalars. I had been following the syntax from the nlsur manual entry without a good understanding of the syntax. Nick's answer helped me fix an error in my current program that was caused by my confusion about tempnames and scalars. Thanks again.

Carl Nelson
________________________________________
From: [email protected] [[email protected]] On Behalf Of Nick Cox [[email protected]]
Sent: Friday, February 05, 2010 6:12 AM
To: [email protected]
Subject: st: RE: function evaluator program

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/

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