I am struggeling with reshaping my data from wide to long. I want to use a string variable to create new varibles in long formate. Here is what I want to do, I want to get from this:
Code:
version 15 clear all input str10 cat lesion1 lesion2 lesion3 "type" 4 5 1 "size" 22 33 44 end list
to that format:
Code:
version 15 clear all input lesion type size 1 4 22 2 5 33 3 1 44 end list
Code:
version 15 clear all input str10 cat lesion1 lesion2 lesion3 "type" 4 5 1 "size" 22 33 44 end reshape long lesion, i(cat) j(lesion_no) list
Thanks for any help!
0 Response to reshape from wide to long with string variable defining new variables in long format
Post a Comment