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?
Unit root test for panel dataHi, I am trying to do unit root test for panel data, every time it brings errors saying sample may n…
two-sided logit model (tslogit) in StataDear Stata users, Firstly, let me briefly introduce two-sided logit (TSL) model. In 1996 John Allen…
Unit root testHi, I am trying to do unit root test for panel data, every time it brings errors saying sample may n…
replacing values during importDear All, given a dataset in tab-delimited format, is there any way to tell the insheet/import deli…
Unit root test error in panel dataHi, I am trying to do unit root test for panel data, every time it brings errors saying sample may n…
Subscribe to:
Post Comments (Atom)
0 Response to What is Stata's full algorithm for automatically labelling axes on plots?
Post a Comment