Announcement

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

  • Convert frequency table to list of values

    If I have


    No./Frequency
    1 4
    2 1
    3 2
    4 1

    How can i convert it to:

    1
    1
    1
    1
    2
    3
    3
    4


    thanks

  • #2
    start by taking a look at this FAQ: http://www.stata.com/support/faqs/da...ate/index.html

    Comment


    • #3
      Code:
      help expand

      Comment


      • #4
        I don't see why Kerri would need expand, or even store frequencies. Simply:

        Code:
        sort var1
        list var1, noobs nol clean

        Comment


        • #5
          Ben: If those are indeed the data, you are correct; but why then ask the question? I was guessing that the data arrive as frequencies.

          Comment


          • #6
            Good point, Nick. Based on the limited info in the post, could go either way. I was assuming somebody new who knew tab but not list. Well, one of the two approaches will work.

            Comment

            Working...
            X