您好!
请大师帮忙处理STATA 数据, 我看了STATA youtube 视频, 跟着同样的命令操作, 但是还是出错。
- How to reshape data from wide format to long format
- . reshape long LLP TA NI NPL ChgSP NOI TL AccSD ChgGDP, i(Bank ID) j(Year)variable ID not foundr(111);
. reshape long LLP TA NI NPL ChgSP NOI TL AccSD ChgGDP, i(BankID) j(Year)no xij variables found You typed something like reshape wide a b, i(i) j(j). reshape looked for existing variables named a# and b# but could not find any. Remember this picture:
long wide +---------------+ +------------------+ | i j a b | | i a1 a2 b1 b2 | |---------------| <--- reshape ---> |------------------| | 1 1 1 2 | | 1 1 3 2 4 | | 1 2 3 4 | | 2 5 7 6 8 | | 2 1 5 6 | +------------------+ | 2 2 7 8 | +---------------+
long to wide: reshape wide a b, i(i) j(j) (j existing variable) wide to long: reshape long a b, i(i) j(j) (j new variable)r(111);我有9个Variables, 10 年的数据, 有偿求助!!!