Statalist


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

Re: st: RE: Syntax problems with maximum likelihood (method lf)


From   "Glenn Goldsmith" <glenn.goldsmith@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: RE: Syntax problems with maximum likelihood (method lf)
Date   Thu, 30 Oct 2008 11:55:33 -0000

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" <katia.bobulova@googlemail.com> 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/



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