I'm trying to flip my datasheet to that the top answer is the bottom answer. The datasheet has a variable "respondentid" which is the last person to complete to the first person to complete. So, I thought "sort respondentid" would flip the datasheet but it seems to affect the data in other variables too? For example look how it changes my age responses? The one prior to sorting is the correct ones:
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double respondentid str8 childsage 12045945006 "3" 12045548193 "7" 12042524824 "16" 12033262991 "16" 12024769822 "6" 12012655474 "6" 12010474850 "6" 12008334572 "1" 12007008928 "3" 12003988752 "9" 12003928337 "7" 11993083730 "13" 11992560388 "7" 11985299857 "11" 11980278885 "8" 11971649755 "4" 11965056891 "6" 11964343894 "1" 11958870742 "10" 11958870087 "4" 11958793425 "6" 11958154463 "14" 11957020152 "6" 11954997303 "6" 11954201617 "14" 11953833763 "9" 11953227400 "15" 11952049934 "5" 11951378445 "3" 11951321566 "4" 11951283735 "7" 11946528554 "3" 11946503737 "1" 11945990714 "12" 11944481723 "13" 11944434441 "15" 11942119530 "1" 11926492862 "5" 11926407490 "3" 11923229055 "9" 11916539051 "16" 11916505684 "15" 11915809743 "11" 11910251080 "2" 11904205592 "2" 11868743521 "7" 11865518958 "5" 11863732442 "11" 11863640097 "3" 11861226674 "15" 11861046773 "2" 11858765747 "4" 11855731913 "1" 11851914656 "4" 11850008665 "16" 11849100238 "6" 11847627050 "1" 11841956514 "2" 11839428668 "9" 11836925524 "3" 11834650071 "10" 11830653258 "14" 11829912179 "13" 11829200577 "3" 11828339445 "10" 11827378989 "1" 11824300319 "12" 11819231117 "4" 11819037040 "4" 11818480227 "13" 11818055511 "4" 11817016286 "1" 11816801592 "4" 11816648070 "5" 11816377435 "1" 11815125056 "7" 11814705769 "5" 11814521791 "6" 11813334850 "9" 11812983508 "12" 11769061363 "4" 11768717901 "16" 11762648130 "1" 11761828055 "11" 11761224605 "9" 11760345006 "7" 11759638013 "16" 11758943634 "2" 11758932091 "12" 11758912864 "6" 11758906416 "12" 11758123734 "4" 11756836384 "1" 11756796810 "1" 11756541575 "8" 11755983223 "1" 11754994497 "11" 11754928657 "13" 11753333395 "4" 11753244094 "3" end
Listed 100 out of 112 observations
Use the count() option to list more
. sort respondentid
. dataex respondentid childsage
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double respondentid str8 childsage 11751057639 "1" 11751070970 "8" 11751081983 "1" 11751105882 "4" 11751220729 "4" 11751430221 "6" 11751689311 "1" 11751767747 "1" 11751939224 "2" 11752100407 "14" 11753223109 "3" 11753243788 "2" 11753244094 "3" 11753333395 "4" 11754928657 "13" 11754994497 "11" 11755983223 "1" 11756541575 "8" 11756796810 "1" 11756836384 "1" 11758123734 "4" 11758906416 "12" 11758912864 "6" 11758932091 "12" 11758943634 "2" 11759638013 "16" 11760345006 "7" 11761224605 "9" 11761828055 "11" 11762648130 "1" 11768717901 "16" 11769061363 "4" 11812983508 "12" 11813334850 "9" 11814521791 "6" 11814705769 "5" 11815125056 "7" 11816377435 "1" 11816648070 "5" 11816801592 "4" 11817016286 "1" 11818055511 "4" 11818480227 "13" 11819037040 "4" 11819231117 "4" 11824300319 "12" 11827378989 "1" 11828339445 "10" 11829200577 "3" 11829912179 "13" 11830653258 "14" 11834650071 "10" 11836925524 "3" 11839428668 "9" 11841956514 "2" 11847627050 "1" 11849100238 "6" 11850008665 "16" 11851914656 "4" 11855731913 "1" 11858765747 "4" 11861046773 "2" 11861226674 "15" 11863640097 "3" 11863732442 "11" 11865518958 "5" 11868743521 "7" 11904205592 "2" 11910251080 "2" 11915809743 "11" 11916505684 "15" 11916539051 "16" 11923229055 "9" 11926407490 "3" 11926492862 "5" 11942119530 "1" 11944434441 "15" 11944481723 "13" 11945990714 "12" 11946503737 "1" 11946528554 "3" 11951283735 "7" 11951321566 "4" 11951378445 "3" 11952049934 "5" 11953227400 "15" 11953833763 "9" 11954201617 "14" 11954997303 "6" 11957020152 "6" 11958154463 "14" 11958793425 "6" 11958870087 "4" 11958870742 "10" 11964343894 "1" 11965056891 "6" 11971649755 "4" 11980278885 "8" 11985299857 "11" 11992560388 "7" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float participantno str8 childsage 112 "3" 111 "7" 110 "16" 109 "16" 108 "6" 107 "6" 106 "6" 105 "1" 104 "3" 103 "9" 102 "7" 101 "13" 100 "7" 99 "11" 98 "8" 97 "4" 96 "6" 95 "1" 94 "10" 93 "4" 92 "6" 91 "14" 90 "6" 89 "6" 88 "14" 87 "9" 86 "15" 85 "5" 84 "3" 83 "4" 82 "7" 81 "3" 80 "1" 79 "12" 78 "13" 77 "15" 76 "1" 75 "5" 74 "3" 73 "9" 72 "16" 71 "15" 70 "11" 69 "2" 68 "2" 67 "7" 66 "5" 65 "11" 64 "3" 63 "15" 62 "2" 61 "4" 60 "1" 59 "4" 58 "16" 57 "6" 56 "1" 55 "2" 54 "9" 53 "3" 52 "10" 51 "14" 50 "13" 49 "3" 48 "10" 47 "1" 46 "12" 45 "4" 44 "4" 43 "13" 42 "4" 41 "1" 40 "4" 39 "5" 38 "1" 37 "7" 36 "5" 35 "6" 34 "9" 33 "12" 32 "4" 31 "16" 30 "1" 29 "11" 28 "9" 27 "7" 26 "16" 25 "2" 24 "12" 23 "6" 22 "12" 21 "4" 20 "1" 19 "1" 18 "8" 17 "1" 16 "11" 15 "13" 14 "4" 13 "3" end
Listed 100 out of 112 observations
Use the count() option to list more
. sort participantno
. dataex participantno childsage
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float participantno str8 childsage 1 "1" 2 "8" 3 "1" 4 "4" 5 "4" 6 "6" 7 "1" 8 "1" 9 "2" 10 "14" 11 "3" 12 "2" 13 "3" 14 "4" 15 "13" 16 "11" 17 "1" 18 "8" 19 "1" 20 "1" 21 "4" 22 "12" 23 "6" 24 "12" 25 "2" 26 "16" 27 "7" 28 "9" 29 "11" 30 "1" 31 "16" 32 "4" 33 "12" 34 "9" 35 "6" 36 "5" 37 "7" 38 "1" 39 "5" 40 "4" 41 "1" 42 "4" 43 "13" 44 "4" 45 "4" 46 "12" 47 "1" 48 "10" 49 "3" 50 "13" 51 "14" 52 "10" 53 "3" 54 "9" 55 "2" 56 "1" 57 "6" 58 "16" 59 "4" 60 "1" 61 "4" 62 "2" 63 "15" 64 "3" 65 "11" 66 "5" 67 "7" 68 "2" 69 "2" 70 "11" 71 "15" 72 "16" 73 "9" 74 "3" 75 "5" 76 "1" 77 "15" 78 "13" 79 "12" 80 "1" 81 "3" 82 "7" 83 "4" 84 "3" 85 "5" 86 "15" 87 "9" 88 "14" 89 "6" 90 "6" 91 "14" 92 "6" 93 "4" 94 "10" 95 "1" 96 "6" 97 "4" 98 "8" 99 "11" 100 "7" end
0 Response to Sorting by one variable seems to affect other variables in my data sheet
Post a Comment