[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Forvalues, syntax error
On Jul 5, 2007, at 9:13 AM, Gauri Khanna wrote:
summarize i
local max1=r(max)
<snip>
forvalues svy = 1/`max1' {
THIS IS THE ERROR I GET
- forvalues svy = 1/`max1' {
= forvalues svy = 1/. {
invalid syntax
r(198);
The problem is that 1/. is not a valid numeric range. The local
macro max1 contains "." because your variable i is always missing,
and therefore r(max) is not returned.
-- Phil
*
* 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/