Hello,
I want to create a graphic with multiple graphs for each sub catvar and also a graph that is just the average over all sub catvars. However for the overall graph stata gives me a nonsensical graph. It looks like there are 2 y-values for each x-value.
collapse (mean) wage, by(year sex region) bysort year region (sex): gen wage_ratio= wage[1]/wage[2] twoway line wage_ratio year if region==1 /// || line wage_ratio year if region==2 /// || line wage_ratio year /// I also tried adding "if region==1 | region==2" to the last line.
Related Posts with Graphic with graphs for sub catvars and overall graph
MaxDiff (Best-Worst ranking) Analysis in StataHi all, long time lurker here deciding to seek direct support from the experts here as I didn't find…
Splitting messy string varsHello, I am hoping to split up these string vars and generate binary new vars based on whether they …
Problems with a loop to generate new variablesHello Stata Community. I'm working in my master thesis with a data base about middle class, their v…
skip lines of code in do fileHi, Is there any way to skip some lines of codes in a do file? As an example, I want to run codes fr…
Ignoring multiple characters while using destringIf I want to have Stata ignore all letters that come after L while using destring, is there a way to…
Subscribe to:
Post Comments (Atom)
0 Response to Graphic with graphs for sub catvars and overall graph
Post a Comment