Announcement

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

  • Collapsing rows for organizing data correctly (survey data)

    Hello gang

    I'm working on cleaning/organizing a very big dataset of survey data. The goal is to see what factors affect attention to ads. I've attached a picture that explains my problem.
    Click image for larger version

Name:	Data cleaning.PNG
Views:	1
Size:	44.7 KB
ID:	1688811




    I've only shown the response from one respondent (ID:1), but there are of course several thousand respondents which responses/data points that also needs to be organized/collapsed

    So the question is how do i get it from how its organized now ("Wrong") to how I would want it to be organized ("Correct"). I assume i need to use some kind of collapse command, but unsure of what the exact code needs to be.



    Any help would be hugely appreciated.

    Kind regards

    Tor
    Last edited by Tor Haug Anonsen; 10 Nov 2022, 01:26.

  • #2
    Code:
    collapse (mean) Q1-Q10, by(ID)
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Originally posted by Maarten Buis View Post
      Code:
      collapse (mean) Q1-Q10, by(ID)
      I think that fixed it! - thank you so much!

      Comment

      Working...
      X