Hi all,
For reasons that aren't really worth going into, I'm trying to reproduce the algorithm that Stata uses to automatically label plot axes. I understand from here and here that the first bit of the algorithm is to start with the range of the variable and divide it into (about) 5 equally spaced labels. But I think there are other steps n the process, because it also always chooses round numbers (at an appropriate order of magnitude) to display. I'm wondering, is there a command that will produce these values for you automatically for any variable? Or a standard algorithm I could implement?
My instinct was to calculate the range of the variable and divide it into 5 groups, and then maybe use the size of those groups and the floor function in some combination to determine the right level of rounding. By I'm a little stuck at that point. Any thoughts or guidance?
Related Posts with What is Stata's full algorithm for automatically labelling axes on plots?
How to create interaction variable in stataI have 2 independent variables and i need to create an interaction from both variable. The first var…
How to do Reality check and SPA test by Stata?Dear Statalist, I want to know whether there are any user written commands by stata for performing R…
Comparing different cohorts amongst different yearsHello I had a question regarding comparison tests. Currently I'm working on comparing 3 cohorts (pre…
How to recode missing values within a range in StataI asked a similar question earlier. I'm attempting to fill in missing values such that observations …
Blinder–Oaxaca decompositionI'm planning for Blinder–Oaxaca decomposition for a study. In the standard B-O decomposition there a…
Subscribe to:
Post Comments (Atom)
0 Response to What is Stata's full algorithm for automatically labelling axes on plots?
Post a Comment