In whatever you typed to call this, there
is presumably only one argument, so your
local macro -lgam- is undefined.
That is, if you call
mgweibull_lf <un> <deux> <trois>
argument <un> is mapped to -lnf-
<deux> is mapped to -lgam-
<trois> is mapped to -lalpha-
Stata can't see <deux>
Nick
[email protected]
Marie Godquin
> I'm writing my first likelihood maximizer but I'm stuck at
> the very first
> command of my program when I run my ado file.
> It looks like stata won't allow me to generate a variable based on my
> arguments.
> This mimics however exactly an example given in the stata
> manual "maximum
> likelihood estimation with stata"...
> Really don't see what the problem is... Any suggestion?
> Sorry for the simplicity of the question...
>
> . cap program drop mgweibull_lf
>
> . version 8.0
>
> .
> . args lnf lgam lalpha
>
> .
> . tempvar p S1 S2 S3 f
>
> .
> .
> . qui gen double `p'=exp(2*`lgam')
> 2* invalid name
> r(198);
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/