Abstract

Stata tip 140: Shorter or fewer category labels with graph bar

Highlights

  • The difficulties discussed in this tip arise most commonly with graph bar, but if the solutions help with the other commands, that is fine

  • The general problem addressed in this tip is that you are using graph bar and your categorical axis labels are a mess

  • 264 The immediate stimulus for this tip was a thread on Statalist, Stata tip 140 https://www.statalist.org/forums/forum/general-stata-discussion/general/ 1565227-graph-bar-over-year-how-to-shorten-displayed-year-labels which started on 24 July 2020

Read more

Summary

The problem

Stata does not have the concept of a categorical variable, but statistical people do, as shown by many book titles alone (for example, Fienberg [1980]; Lloyd [1999]; Simonoff [2003]; Tutz [2012]; Agresti [2013]; Long and Freese [2014]). The difficulties discussed in this tip arise most commonly with graph bar, but if the solutions help with the other commands, that is fine Those difficulties arise often with predictor variables that a researcher would not think of as categorical at all. You would not want to have to edit a series of options naming x-axis properties to the corresponding y-axis properties, and which is what graph twoway often requires if you change axes. The example in this thread of a bar chart for time series raises just about all the generic issues that arise commonly. The default that every predictor value—every distinct category—is matched by an explicit text label is not always what you want for time series

Possible solution
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.