I am essentially trying to compress a row of variables into just the non-missing entries. My dataset looks like this
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(q5__1 q5__2 q5__3 q5__4 q5__5 q5__6 q5__7 q5__8 q5__9 q5__10) . 2 . . . . . . 0 0 1 . . . . . . . 0 0 . . . . . . . . 0 0 . . . . . . . . 0 0 . . . . . . . . 0 0 . . . . . . . . 0 0 . 2 . . . . . . 0 0 1 . . . . . . . 0 0 . . 3 . . . . . 0 0 . . . 4 . . . . 0 0 . . . . . . 7 . 0 0 end
Any ideas?
Many thanks!
Chris
0 Response to Generating a new variable that equals the Nth non-missing value in a row
Post a Comment