Dear All, I have this dataset,
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str3 code str4 seriesname double(yr2015 yr2016 yr2017)
"CAN" "inf"    1.12524136094279    1.4287595470108    1.5968841285297
"JPN" "inf"    .789517890139427  -.116666666666671   .467211747038214
"USA" "inf"    .118627135552435   1.26158320570537   2.13011000365963
"CAN" "prvt"                  .                  .                  .
"JPN" "prvt" 162.30694503499905 162.35440967317416 168.19138836880097
"USA" "prvt"  188.2037313190976  192.1654998496473                  .
end
and wish to have the following result
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str3 code double(inf2015 inf2016 inf2017) double(prvt2015 prvt2016 prvt2017)
"CAN"   1.12524136094279    1.4287595470108    1.5968841285297                   .                  .                  .
"JPN"   .789517890139427  -.116666666666671   .467211747038214  162.30694503499905 162.35440967317416 168.19138836880097
"USA"   .118627135552435   1.26158320570537   2.13011000365963   188.2037313190976  192.1654998496473                  .
end
Any suggestions are appreciated!