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

st: problem with forvalues


From   "Didier Fouarge" <[email protected]>
To   [email protected]
Subject   st: problem with forvalues
Date   Mon, 17 Jun 2002 12:44:12 +0200

Hi,

I want to loop a tabstat command to compute median income for a number of years using 
�forvalues� in a do-file. According to the help function the following should be allowed:

forvalues i = 1 2 5/10 {
	tabstat Y`i�, by(country) s(p50)
}

However, I get the following error message: 

invalid syntax 
r(198);

By the way, I get the same error message using other commands such as sum Y`i�.

forvalues i = 1/10 { ...  works perfectly.


Can anyone help?


didier fouarge


--------------------------------------------------
Didier Fouarge
Organisatie voor Strategisch Arbeidsmarktonderzoek (OSA)
Postbus 90153
NL-5000 LE Tilburg

Tel: 013 4663095 / 3001
Tel Secr: 013 4663350
Fax: 013 4663349
http://osa.kub.nl

E-mail: [email protected]
http://come.to/didierfouarge

*
*   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