Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: syntax error

From   "David Rivenbark" <>
To   <>
Subject   st: syntax error
Date   Tue, 22 Oct 2013 19:03:09 -0400

            I have written a simple rclass program that has the following

Program MYprog, rclass

     syntax varlist [if] [in] [, opt1(real 0) opt2(real 0) . ]

     gettoken y x1 x2 : varlist

     tempvar q

     gen double `q' = f(`y',`x1',`x2')
     sum `q'
     return scalar mean=r(mean)


When I run the program with "MYprog y x1 x2" I receive an "invalid syntax"
error message Stata reaches -gettoken-. Can someone help me understand my
error using -gettoken-?

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index