Statalist


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

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


From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: RE: Syntax problems with maximum likelihood (method lf)
Date   Wed, 29 Oct 2008 15:54:39 -0500

I don't know if it is running correctly, but your code does run for me. With a data set already open, I wind up with 2 vars, _MLtu1 and _MLw1, whose values all equal 1. I suggest you make sure your Stata is entirely up to date. If you really are on 10.0, whatever your problem is may have been fixed in 10.1. Use the -update all- command and follow the instructions.

At 02:05 PM 10/29/2008, Katia Bobulova 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




-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

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