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: RE: r(198) frustration--need help


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: r(198) frustration--need help
Date   Thu, 13 May 2010 23:06:20 +0200

<>

To make your code more readable, you may want to use things like

***********
if inlist(Naics34,237, 2361, 2381, 2382, 2383)
***********

for your qualifier. Still, -set trace on- and report the area around the
error. It is unlikely that the "&" in your -note- is at fault here.

HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ting Zhang
Sent: Donnerstag, 13. Mai 2010 22:57
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index