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
Correspondence between the statistical significant effect of coefficients in a table and marginal effects in a graphDear members of the list, For a sample of highly educated young adults in 24 countries that partici…
Lags in time series with only trading daysHello together, for my thesis I have a dataset which contains stock prices over a period of 28 year…
Running xtpcse on unbalanced panel dataHi I am really new in statistics and stata; so firstly I do apologies if my question does not make …
Locals vs variables: ML estimatorDear all, I have a general question regarding the use of locals vs actually creating temporary varia…
Why are the arguments passed to my program through the syntax command not displaying per the STATA manual example?Please ignore this post …
Subscribe to:
Post Comments (Atom)
0 Response to Collapse data
Post a Comment