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

From |
Jeph Herrin <junk@spandrel.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: minor bug in -describe-? |

Date |
Thu, 30 Oct 2008 11:00:16 -0400 |

I did notice it applied to other reserved words, but I hadn't noticed it applied to other commands (eg, -regress-). I'll drop StataCorp a note about the issue. cheers, Jeph Sergiy Radyakin wrote:

Martin, it applies not only to -describe-, it is all over: sysuse auto, clear rename trunk income regress price inc* regress price in* And in this case the message "varlist not allowed" can knockout anyone who wanted to use it in according to the syntax: regress depvar indepvarlist It also applies to reserved words -if- and -using-, but not to -byte-. (Tried "ifo", "using_method", and "bytevar" as variable names in the code above and abbreviated to the length of the reserved word). In general I do want the above regression to work, and when parsing a command for parts of syntax, "in" should be different from "in*". But may be there is something else there. Since -syntax- is built-in , we may never know, unless someone from Stata, corp steps in. A related 'bug' (?) would be the following: generate byte long float double z=1 is this a valid command? if yes, what is the resulting type of z? why? Best wishes, Sergiy Radyakin On Wed, Oct 29, 2008 at 5:34 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:Ok, thanks for that! I thought that line 7 of describe.ado did the same as -varlist- in -syntax- but your example has convinced me that it does not. What is your take on the bug issue, then? HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Sergiy Radyakin Sent: Wednesday, October 29, 2008 10:26 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: minor bug in -describe-? Hi Martin, if one writes -varlist- variables must already exist in memory. But you sometimes want: clear describe somevars using somefile.dta to work. Your modified version will work ok, but replace it with varlist and see what happens. Best regards, Sergiy Radyakin On Wed, Oct 29, 2008 at 4:46 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:Curiously, describe.ado takes -anything- in its -syntax- statement. If you copy it to your very own describe2.ado in your personal directory and restate that as -anything(everything)- then you can pass it "in*" and it works as expected. I think that could be called a bug. Whether minor ornot,I do not want to decide... -help describe- indicates that it takes a -varlist- so why would one want -anything- and not -varlist- in the-syntax-statement? HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jeph Herrin Sent: Wednesday, October 29, 2008 6:53 PM To: statalist@hsphsun2.harvard.edu Subject: st: minor bug in -describe-? -in- is a reserved word in Stata, but it's also a very common prefix for variable names. So I often run into this: . d in* varlist not allowed r(101); Obviously, -describe- takes a varlist, but it won't take a varlist that looks like a reserved word. A bug, right? Or is there a reason for this? thanks, Jeph * * 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/ * * 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/* * 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/ * * 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/* * 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/

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

**References**:**st: minor bug in -describe-?***From:*Jeph Herrin <junk@spandrel.net>

**Re: st: RE: minor bug in -describe-?***From:*"Sergiy Radyakin" <serjradyakin@gmail.com>

**Re: st: RE: minor bug in -describe-?***From:*"Sergiy Radyakin" <serjradyakin@gmail.com>

- Prev by Date:
**Re: st: Mincer wage function as a log function - how can stata calculate the percent values** - Next by Date:
**Re: st: Insheet whiel Ignoring Headers** - Previous by thread:
**Re: st: RE: minor bug in -describe-?** - Next by thread:
**st: re: p-value in stata???** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |