(1) is incorrect, because it is illegal syntax. Stata won't know what to do with the unmatched quotes.
(2) is legal syntax. I can't say whether it is correct for your problem, but provided all the locals are defined, it looks OK to me.
But it is better to get Stata to tell you this.
Nick
[email protected]
[email protected]
Sorry, I am a little confused. Two expressions:
(1) replace `lnc'=`a'*`lnpe'+`b'*``lnpe'*`lnpe''
(2) replace `lnc'=`a'*`lnpe'+`b'*`lnpe'*`lnpe'
Which is the correct one?
Quoting Nick Cox <[email protected]>:
> ``lnpe' or `lne'' can not be legal. As in ordinary language, single
> quotes must be in matching pairs.
*
* 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/