Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: r(198) frustration--need help


From   "Sarah Edgington" <[email protected]>
To   <[email protected]>
Subject   st: RE: r(198) frustration--need help
Date   Thu, 13 May 2010 14:08:25 -0700

I've not made graphs with recent versions of Stata so this solution is a
guess but it looks like the only ampersand you have in your code is in the
note that mentions the Maryland Department of Labor, Licensing & Regulation.
Try changing that to "and".  I'm not sure why the & in the note would be a
problem but that's the only candidate I see in your command.
-Sarah

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ting Zhang
Sent: Thursday, May 13, 2010 1:57 PM
To: [email protected]
Subject: st: r(198) frustration--need help


Hi, 

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

My command is
graph bar eExpansion_perc eContraction_perc eBirth_perc eDeath_perc if
Naics34==237 | Naics34==2361 |  Naics34==2381 | Naics34==2382 |
Naics34==2383, over(Quarter,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" 11 "2006q4" 12 "2007q1" 13 "2007q2" 14
"2007q3" 15 "2007q4" 16 "2008q1" 17 "2008q2" 18 "2008q3" 19 "2008q4" 20
"2009q1" 21 "2009q2")) by(Naics34, iscale(.5) title("Maryland Quarterly
Employment Change Types in Proportions for Selected Industry Subsectors""in
Construction (23), 2004q1-2009q2", size(small))  note("The Jacob France
Institute" "Data received from the Maryland Department of Labor, Licensing &
Regulation", 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("Employment Change as a Percentage of Total (%)", size(small))
ylabel(, valuelabel  labsize(small)) legend(order(1 "Gains from Expansions"
2 "Losses from Contractions" 3 "Gains for Births" 4 "Losses for Deaths"    )
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) eExpansion_perc eContraction_perc eBirth_perc eDeath_perc
if Naics34==237 | Naics34==2361 |  Naics34==2381 | Naics34==2382 |
Naics34==2383, over(Quarter, relabel(1 "2004q2" 2 "2004q3" 3 "2004q4" 4
"2005q1" 5 "2005q2" 6 "2005q3" 7 "2005q4" 8 "2006q1" 9 "2006q2" 10 "2006q3"
11 "2006q4" 12 "2007q1" 13 "2007q2" 14 "2007q3" 15 "2007q4" 16 "2008q1" 17
"2008q2" 18 "2008q3" 19 "2008q4" 20 "2009q1" 21 "2009q2")
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("Employment
Change as a Percentage of Total (%)") ytitle(, size(small)) ylabel(, labels
labsize(small) valuelabel) by(, title("Maryland Quarterly Employment Change
Types in Proportions for Selected Industry Subsectors""in Construction (23),
2004q1-2009q2", size(small)) note("The Jacob France Institute"
"Data received from the Maryland Department of Labor, Licensing &
Regulation", size(vsmall) position(5))) by(, legend(on)) legend(order(1
"Gains from Expansions" 2 "Losses from Contractions" 3 "Gains for Births" 4
"Losses for
Deaths") size(vsmall)) by(Naics34)


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


Now I am frustrated.

I did not 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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index