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]
st: tempvar versus tempname
From
"David Rivenbark" <[email protected]>
To
<[email protected]>
Subject
st: tempvar versus tempname
Date
Tue, 29 Oct 2013 19:56:08 -0400
Hi all:
I have a simple user defined likelihood function that has the
following form
Program my_lf
args lnfj theta1 theta2
tempname xb sigma
tempvar tmp1 tmp2 ....
gen double `xd' = `theta1'
gen double `sigma' = exp(`theta2')
...
replace `lnfj' = ...
end
My model also assumes that `theta1' has of two independent variables x1 and
x2.
I noticed that the results for my model are unchanged by using
-tempname- or -tempvar-. I assume this is because I specify "gen double `xb'
= `theta1'" Has anyone else noticed this before?
David
*
* 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/