Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Variable with too many values

    In my dataset, I have few variables that contain too many values, and STATA fails to run that tab showing 'too many values'. How can I tab and see that variable?

  • #2
    You could always list them, but you're asking for a table with hundreds or thousands of rows and columns. How would that help?

    Comment


    • #3
      Nick Cox is the author of a program that might reduce the size of the listing to a practical size:

      Code:
      contract  tabvariable
      list
      but take care to -preserve- your data. Apparently Stata will tab up to 3,000 (or 12,000 in SE or MP) distinct values so the listing is still going to be pretty long. Maybe you can group the values?
      Last edited by Daniel Feenberg; 20 May 2024, 07:11.

      Comment


      • #4
        It's very nice to be remembered but contract is long since an official command. I would also mention groups from the Stata Journal, except that I am agreeing with Daniel Feenberg: if tabulate won't play you need some other way to look at the distribution.

        Comment


        • #5
          maybe group the values into small ranges, which can you specify with various codes (ceiling, floor, round, xtile, egen cut, and so forth).

          Comment

          Working...
          X