Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Unbalanced parentheses in command when I'm not using any parentheses


From   "McKenna, Timothy" <[email protected]>
To   <[email protected]>
Subject   RE: st: Unbalanced parentheses in command when I'm not using any parentheses
Date   Wed, 6 Dec 2006 18:22:44 -0500

My vote, which doesn't count for much, is that this is a bug.  The
object in question is just a variable label, the parser should capture
the label and put it aside.  Then when it comes time to display the
label it should place the text string in the right spot.  The summarize
command could figure it out, why shouldn't the histogram command?  At
the least this is something that should be fixed in error reporting or
in what is allowed as a label.  If the histogram call in question
actually used a complicated set of parentheses then one could go crazy
trying to rebalance paranetheses that were actually balanced all along.

-Tim

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Wednesday, December 06, 2006 4:58 PM
To: [email protected]
Subject: RE: st: Unbalanced parentheses in command when I'm not using
any parentheses

Sure, it seems strange. But, crudely, Stata knows no semantics, only 
syntax. From most syntactic points of view, unbalanced () [] {} 
are problems and the sooner you find out about them the better. 
As said in my last posting, Stata is misreading your input. 
I'd class that a limitation of Stata's parser, from your and 
any other user's point of view, but I wouldn't call it a bug 
unless I had studied that topic for six months, written parsers, 
and knew I could fix it. None of those are true! 

Not that you are calling it a bug, but just in case anyone's tempted....

Nick 
[email protected] 

Joseph McCrary
 
> Thank you Jeph and Nick. Jeph hit the problem. It works fine 
> when I run 
> histogram on a variable with balanced parentheses in the label (or no 
> parentheses).
> 
> It seems strange to me that what is in the label would make a 
> difference 
> in being able to do the plot.
> 
> Jeph Herrin wrote:
> > Could it be related to the unbalanced "[" in the variable label?
> >
> > Just a thought.
> >
> > Joe McCrary wrote:
> >> I get a strange error message on a histogram command using 
> Stata 9.2
> >> on Windows X64:
> >>
> >> . histogram mc2t0405
> >> (bin=20, start=44.09, width=2.7955)
> >> parentheses unbalanced
> >> r(132);
> >>
> >> However, I have no problem summarizing the same variable.
> >>
> >> . summarize  mc2t0405, detail
> >>
> >>       math % meeting and exceeding standards for all
> >>              students [overall district standa
> >> -------------------------------------------------------------
> >>      Percentiles      Smallest
> >> 1%        58.28          44.09
> >> 5%        65.81          53.72
> >> 10%        71.25          54.31       Obs                 436
> >> 25%       81.455          55.38       Sum of Wgt.         436
> >>
> >> 50%        89.87                      Mean           87.22103
> >>                        Largest       Std. Dev.      10.67012
> >> 75%        95.58            100
> >> 90%        98.76            100       Variance       113.8515
> >> 95%        99.88            100       Skewness      -1.049067
> >> 99%          100            100       Kurtosis       3.645815
> >>
> >> Has anyone seen this? It's happening for any variable I 
> try to run a
> >> histogram on.

*
*   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/ 
  
_____________________________________________________________ 
  
This e-mail and any attachments may be confidential or legally privileged.  If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein.  Please inform us of the erroneous delivery by return e-mail.  
  
Thank you for your cooperation. 
  
_____________________________________________________________ 
 

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