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

st: ML for a simple estimation

From   Vincenzo <[email protected]>
To   [email protected]
Subject   st: ML for a simple estimation
Date   Mon, 2 Feb 2009 19:00:58 +0000

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




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


  ml model lf maxlik (x=d0b d0f)
  ml maximize

*   For searches and help try:

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