Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: syntax error


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: syntax error
Date   Tue, 15 Feb 2005 18:01:35 -0000

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/



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