Hi,
Having monthly panel data, I want to convert from monthly to quarterly. Used these following options,
gen month = substr(E,1,2)
destring month, replace
destring D, replace
gen qdate = qofd(dofm(ym(D, month)))
format %tq qdate
But after that I run the Collapse option "collapse pr, by (ID qdate)" , it shows the error,
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "01-January" "56.8" 1 1 200
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "03-March" "68.09999999999999" 1 3 200
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "02-February" "57.5" 1 2 200
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "06-June" "72.2" 1 6 201
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "05-May" "69.09999999999999" 1 5 201
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "04-April" "66.09999999999999" 1 4 201
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "07-July" "72.7" 1 7 202
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "08-August" "70" 1 8 202
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "09-September" "67.7" 1 9 202
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "12-December" "85.09999999999999" 1 12 203
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "11-November" "70" 1 11 203
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2010 "10-October" "77.3" 1 10 203
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2011 "01-January" "70.7" 1 1 204
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2011 "03-March" "79" 1 3 204
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2011 "02-February" "68.5" 1 2 204
"B-D. (Mining And Quarrying; Manufacturing; Electricity, Gas, Steam And Air Conditioning Supply)" 2011 "05-May" "79.5" 1 5 205
How can I solve this problem? Pls, help me!
Related Posts with Collapse data
Whether coefficients of before clustering and after clustering in using reg command is strange?Hi all, Today I run a simple reg for a panel dataset with a panel of units and time periods , I con…
Export adjusted ratios from dstdize commandDear all, Really appreciate if someone could kindly help me. I'm using Code: dstdize command to ca…
Necessary co-variate omitted due to collinearityHi everyone, I had a quick question. I am new to Stata, so please forgive me if this question seems…
Problem with number of instrument with xtabond2Hello everyone, I am just new to managing panel series and I am working on the investigation of fina…
Retrieving data from online archive database and making it ready for STATA (CEDA Archive database) THERE MUST BE SOMEONE HERE WHO IS ABLE TO DO THIS Hi everyone, I'm in a bit of a pickle. I have …
Subscribe to:
Post Comments (Atom)
0 Response to Collapse data
Post a Comment