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?
Problem with Gen & string/numeric variable conversionDear forum members, I am new to Stata and having a problem that I can't seem to find a straightforw…
Difficulty with margins: Wald estimate discrepency between ivreg2 and marginsHello, I am trying to estimate the Wald estimand and calculate standard errors using margins and sue…
svy: tabulate seems to misprint the extended missing value .zHello Statalist members, I am using Stata 17 (ver.10May2022). I found that svy: tabulate doesn't se…
Scaling fitted values obtained from first stage of IVHi everyone: I am running the following regression where I instrument my binary endogenous treatmen…
Meta analysis using stata 15How can I test/visualize subgroup difference. I use metan by(subgroup) but I can’t get the differenc…
Subscribe to:
Post Comments (Atom)
0 Response to What is Stata's full algorithm for automatically labelling axes on plots?
Post a Comment