This is a basic review of how to bin variables in Stata, meaning how to divide their range or support into disjoint intervals. I survey rounding functions with emphasis on floor and ceiling functions as tools to get clearly defined intervals of equal width. Using a specific display format is usually a better idea than rounding to multiples of a fraction. Quantile binning is popular in several fields. I give tips and tricks on how to produce such bins and also on how to show their limitations. Experimentation with the display command or Mata is a good way to learn about functions and to test binning rules.
© 2001-2024 Fundación Dialnet · Todos los derechos reservados