I can see at least a couple of potential problems with the final -quietly
replace- call: there are missing "'"s in "(`mc)" and "(`mb)", and you appear
to have unbalanced parentheses at the end: The final fragment "(((`mc')
*(`sigma')" Opens four parentheses and only closes two.
"Katia Bobulova" <[email protected]> wrote:
>Dear Nick,
>
>I'll try to be more clear.
>
>following my program:
>
>program define myprogram
>version 10.0
>args lnf a b c e
>
>tempvar sigma mc ma msigma mb
>
>quietly gen double `sigma'=0.5*`e'
>quietly gen double `mc'=1-`c'
>quietly gen double `ma'=1-`a'
>quietly gen double `msigma'=1-`e'
>quietly gen double `mb'=1-`b'
>
>quietly replace
>`lnf'=ln((`a')*(`b')*((((`mc')*(`sigma')+(`m'))^alfa)*(((`mc')*(`sigma'))^s
>)*(((`mc)*(`msigma'))^n))+
> (`a')*(`mb)*((((`mc') *(`sigma'))^b)*(((`mc') *(`sigma')
>
>end
>
>Everything is fine, but when I type:
>
>ml model lf myprogram (a:) (b:) (c:) (e:)
>
>Stata tells me that is invalid syntax.
>
>What's wrong?
>
>Thanks
>
>Katia
*
* 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/