Hello all,
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
I tried the reshape command but was not able to end up with the desired result. I get something like this:

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!