Dear All,
I'm very new to ML command. I'm trying to estimate a model using MLE.
As you can see in my program (in reality this is a simplified
version), I defined the parameters to be estimated in the args string
(these are L0 L1 and d).
The other letters in the loglikelihood represent variable.
When I run the program I have an r(198) for invalid sintax.
Maybe the way the program works is not clear to me..
Any suggestion about how to fix the problem i welcome
Thanks,
Vincenzo
_______________________________________
program define maxlik
args lnf L0 L1 d
quietly replace `lnf' = (2-d0b-d0f)*ln(`L0')+ln((`L1')/(`d')) if
$ML_y1==0
quietly replace `lnf' = 1+ln((`L0')/(`d')) if $ML_y1==1
end
ml model lf maxlik (x=d0b d0f)
ml maximize
_________________________________________
*
* 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/