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

st: RE: parentheses don't balance?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: parentheses don't balance?
Date   Fri, 7 Feb 2003 18:51:39 -0000

Christopher W. Ryan
 
> Stata 8 on Win98, freshly updated. 
> The following command was generated by using the overlaid 
> twoway graph dialogue 
> box, using the sysuse auto data.  It yielded an error 
> message:  "parentheses do 
> not balance"
> 
> I count 21 parentheses in each direction, ie 21 pairs.
> 
> Am I missing something?
> 
> And how could a command generated by a dialogue box (that 
> is, by Stata itself) 
> have an error in the parentheses?  I didn't type them in.   
> Must mean there is 
> something wrong with the way the dialogue box works?
> 
> Thanks.
> 
> twoway (scatter mpg weight if foreign==0, msymbol(square) 
> msize(medsmall) 
> mcolor("255 0 0") mlabel(rep78)) (scatter mpg weight if 
> foreign==1, msymbol(x) 
> mcolor("0 0 255") mlabel(rep78)), ytitle(miles per gallon, 
> color("0 0 128")) 
> xtitle(weight, color("0 0 128")) title(Mileage for Weight, 
> size(medium)) 
> subtitle(By country of origin, size(small)) caption(Stata 
> fictional data) 
> note(February 2003) legend(on colfirst order(1 "domestic 2 
> "foreign"))

I think that you are getting the wrong error message. 

Be that as it may, Stata is confused by what you typed. 
The use of a dialog box is, I guess, not the point here. 

Try binding your -title()- strings in " ". 

Otherwise how is Stata to distinguish a comma within 
a title from a comma separating a title from suboptions? 

Other examples of missing " also need to be fixed. 
e.g. "domestic should be "domestic". 

Nick 
[email protected] 

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