I'm using Stata 14 on a windows 10 OS.
I have a quarterly data set with very long variables names in a wide dataset
I want to drop all characters after the years, but the variable names (first part of characters) have different numbers of characters to keep. Is that a straightforward way to rename all variables at once?
One more thing, if I keep CtaRecCPDez2017, FornecDez2017 (...) can I use the following code to reshape wide to long?
I have a quarterly data set with very long variables names in a wide dataset
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str13 Name str10(CtaRecCPDez2017emmoedaori CtaRecCPSet2017emmoedaori CtaRecCPJun2017emmoedaori FornecDez2017emmoedaorig) str9 FornecSet2017emmoedaorig str10 FornecJun2017emmoedaorig "524 Particip" "0" "0" "0" "0" "0" "0" "AES Elpa" "0" "0" "0" "15" "31" "27" "Alef S/A" "0" "0" "0" "0" "0" "0" "Alfa Holding" "0" "0" "0" "194" "146" "73" "Alfa Holding" "0" "0" "0" "194" "146" "73" end
One more thing, if I keep CtaRecCPDez2017, FornecDez2017 (...) can I use the following code to reshape wide to long?
Code:
reshape long CtaRecCPDez2017 FornecDez2017, i(A) j(Year)
Comment