I'm using the following code to produce a bar chart with confidence intervals. If I drop the options, Stata produces the graph.
If I leave the options in, as shown below, I get the response: "option xlabel not allowed". Doesn't matter what option I put first--I'll get an error for it.
Seems clear there's a coding error, but I cannot figure out what it is.
collapse (mean) meanage=agefrstmar (sd) sdage=agefrstmar (count) n=agefrstmar if age20_35==1 [aw=perweight], by(sample)
generate upper_CI=meanage + invttail(n-1,0.025)*(sdage / sqrt(n))
generate lower_CI=meanage - invttail(n-1,0.025)*(sdage / sqrt(n))
graph twoway (bar meanage sample)(rcap upper_CI lower_CI sample), ///
xlabel 64601 "1992" 64602 "2000" 64603 "2005"64604 "2010" 64606 "2014"
title "Mean Age at First Marriage"
Thanks for any help.
Related Posts with Cannot get options to work on graph twoway
bysort commandHello, I have a clarificatory question about the bysort command. Suppose in my datafile HHID is the …
Data Editor - Toolbar QuestionGood morning, Is it possible to put the 'New Do-File Editor' toolbar icon on the Data Editor toolba…
Graph align xtitle rightHi, I have been trying to move my xtitle in a graph towards the right instead of centered. I checked…
random selection between observationHi everyone, In the below dataset, I want to randomly delete one of the observations that has the sa…
Outreg2 Questions relatd to the regression constant term, Missing R squared, and having Multiple tables in one docHi, Code: xtivreg ChgLCon (L.Underperformance_Peer=L2.Financial_Crisis) L.Cost_Income_Ratio L.HH_…
Subscribe to:
Post Comments (Atom)
0 Response to Cannot get options to work on graph twoway
Post a Comment