I'm using Stata 14 on Windows 10 OS.
I have quarterly data on a wide form. Here is a pick of my data
I want to reshaping to long extracting the dates from variables names. Is that a way to do it quickly for all my variables?
I have quarterly data on a wide form. Here is a pick of my data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str13 Nome str10(CtaRecCPDez2017 CtaRecCPSet2017 CtaRecCPJun2017 ClieCPDez2017 ClieCPSet2017 ClieCPJun2017 FornecDez2017) str9 FornecSet2017 "Nordon Met" "500" "496" "493" "0" "0" "0" "382" "125" "Lojas Hering" "567" "534" "489" "567" "534" "489" "77" "87" "Lojas Hering" "567" "534" "489" "567" "534" "489" "77" "87" "Ideiasnet" "820" "656" "573" "0" "186" "287" "741" "789" "IGB S/A" "877" "827" "780" "0" "0" "0" "17577" "4282" "Aliperti" "1074" "4074" "9114" "1074" "4074" "9114" "2404" "4637" "Aliperti" "1074" "4074" "9114" "1074" "4074" "9114" "2404" "4637" "Hercules" "1098" "1102" "895" "916" "998" "783" "42" "24" "Hercules" "1098" "1102" "895" "916" "998" "783" "42" "24" "J B Duarte" "1145" "1145" "1144" "0" "0" "0" "734" "1088" "J B Duarte" "1145" "1145" "1144" "0" "0" "0" "734" "1088" end
I want to reshaping to long extracting the dates from variables names. Is that a way to do it quickly for all my variables?
Comment