Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Syntax error with Syntax itself
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Syntax error with Syntax itself
Date
Wed, 8 Aug 2012 21:34:00 +0100
-breaks()- requires an integer argument but is not compulsory. It
therefore requires a default.
-goodliq()- is said to take a numeric argument, but that keyword is
not allowed by itself.
All documented.
Nick
On Wed, Aug 8, 2012 at 9:21 PM, Pradipto Banerjee
<[email protected]> wrote:
> Hi, I am writing an egen function
>
> program define _gmakesigwgt
> version 9.2
> gettoken type 0 : 0
> gettoken g 0 : 0
> gettoken eqs 0 : 0
> syntax varlist (min=2) [, BY(string) BReaks(integer) GOODliq(numeric)]
> .
> .
> .
> end
>
>
> I've been debugging it using set trace on (set tracedepth 2). I tried calling it as
>
> . egen var2 = makesigwgt (var1 var2 var3), by(var4)
>
> The debug shows me that there is an -error 197-, i.e. error with the syntax statement itself. The exact error output is:
>
> - syntax varlist (min=2) [, BY(string) BReaks(integer) GOODliq(numeric)]
> invalid syntax
> r(197)
>
>
> I can't understand what might be the error. Can someone give any suggestions?
*
* 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/