Announcement

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

  • oneway table in tabout for a common kind of survey item(s)

    Hello,

    I have a number of survey questions that look like this:
    Not imp. A little imp. Imp. Very imp.
    How important is thing X to you? 1 2 3 4
    How important is thing Y to you? 1 2 3 4
    How important is thing Z to you? 1 2 3 4
    How do I produce (and export) a oneway table where the percentages/frequencies in each box, for each item, are positioned in sequential columns, just like the question is organized? And all the sub-items are rows in the same table? I have not been able to figure out how to do this using such commands as tabout, tabm, fre, etc.

    Any help appreciated.

    Best,
    Ethan

  • #2
    Here's a quick approach that would get you better than halfway there, with a rough table you could copy and paste. I'm presuming you have individual data, with variables named questX, questY, and questZ.
    Code:
    reshape long quest, i(id) j(topic) string
    tab2 topic quest, row

    Comment


    • #3
      Mike: Thank you! This does seem to work, and it can be followed by a tabout command:

      tabout topic income using "${section_1}_reshaped.tex", ///
      replace ///
      c(row) row npos(col)

      But, though your solution works, Mike, it's seems like a workaround for something that ought to be easier. I'll have to "reshape" the data differently for each series of survey items structured this way. And this is such a common kind of survey question. I wonder if anyone has a solution that can work with the original "wide" data?

      Comment

      Working...
      X