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

st: RE: problem with forvalues


From   "Daniel Muller" <mekongTOEB@dng.vnn.vn>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: problem with forvalues
Date   Mon, 17 Jun 2002 18:14:42 +0700

It looks as if you are using the wrong closing quote for the local macro (*
? * instead of * ' *).

Daniel

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Didier Fouarge
> Sent: Monday, June 17, 2002 5:44 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: problem with forvalues
>
>
> 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: fouarge@kub.nl
> 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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index