Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73283

Change table shape

$
0
0
Dear Stata Users,

My data is in time-series format. Each column represents stocks which were selected in a respective week.
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12(Week1 Week2 Week3)
"KR7002351005" "KR7000541003" "KR7003413002"
"KR7002840007" "KR7000681007" "KR7005800008"
"KR7002951002" "KR7000720003" "KR7011500006"
end
I need to change a shape of a table in such a way that Week 2 stocks (column) appear beneath Week 1. Week 3 appears beneath Week 2 etc.

The table should look like that:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12 IssueCode float Week
"KR7002351005" 1
"KR7002840007" 1
"KR7002951002" 1
"KR7000541003" 2
"KR7000681007" 2
"KR7000720003" 2
"KR7003413002" 3
"KR7005800008" 3
"KR7011500006" 3
end
Any thoughts how to implemet it?

Thank you.

Viewing all articles
Browse latest Browse all 73283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>