Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: what is wrong with this graph bar command? Stata 11 issue?


From   Ting <allon_crazy@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: what is wrong with this graph bar command? Stata 11 issue?
Date   Sun, 16 May 2010 09:37:42 -0700 (PDT)

Hi, 

I entered this generating graph command, but STATA 11 told me 
invalid '&' 
r(198);

My command was
graph bar e1 e2 e3 e4 if N34==237 | N34==2361 , over(Time,label(angle(45) labsize(small)) relabel(1 "2004q2" 2 "2004q3" 3 "2004q4" 4 "2005q1" 5 "2005q2" 6 "2005q3" 7 "2005q4" 8 "2006q1" 9 "2006q2" 10 "2006q3" )) by(N34, iscale(.5) title("Change in Proportions", 2004q1-2006q3", size(small))  note("Data Source", justification(right) position(5)  alignment(baseline) size(vsmall))  ) stack bar(1, fcolor(navy) lcolor(navy)) bar(2, fcolor(maroon) lcolor(maroon)) bar(3, fcolor(ltblue) lcolor(ltblue)) bar(4, fcolor(orange) lcolor(orange)) 
ytitle("Changes in Percentage (%)", size(small)) ylabel(, valuelabel  labsize(small)) legend(order(1 "Gains" 2 "Losses " 3 "Gains2" 4 "Losses2"    ) size(vsmall) )


Then I used the windows graph assist program, stata system entered this following command after I filling every necessary box:
graph bar (asis)e1 e2 e3 e4 if N34==237 | N34==2361 , over(Quarter, relabel(1
"2004q2" 2 "2004q3" 3 "2004q4" 4
"2005q1" 5 "2005q2" 6 "2005q3" 7
"2005q4" 8 "2006q1" 9 "2006q2" 10
"2006q3" )
label(angle(forty_five) labsize(small))) stack bar(1, fcolor(navy)
lcolor(navy)) bar(2, fcolor(maroon) lcolor(maroon)) bar(3, fcolor(ltblue)
lcolor(ltblue)) bar(4, fcolor(orange) lcolor(orange)) ytitle("
Change in Percentage") ytitle(, size(small)) ylabel(,
labels labsize(small) valuelabel) by(,
title("Change in Proportions", size(small)) note(
"Data Sources", size(vsmall) position(5))) by(, legend(on)) legend(order(1 "Gains" 2 "Losses" 3 "Gains2" 4 "Losses2") size(vsmall)) by(N34)


however. stata 11 again returned:
invalid '&' 
r(198);


Now I am frustrated.

I did not seem to have that problem before when using STATA 9

Your help would be greatly appreciated

Ting


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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index