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
Coefplot issueHi all, I have a quick question. My code is below. When I do this code without the "at(vertical)" p…
A problem in Maximum Likelihood estimation (MLE) "‘lnfj’ invalid name"..Hello everyone, I am learning the MLE model and practicing through the book examples using Stata12.…
collapse all Variables in StataHi I have number of variables in Stata and I want to collapse in Stata using mean statistics. coll…
Why no results for "estat abond" when running an xtabond mondel with "vce(gmm)"?Hi all, I'm estimating a model with the xtabond command, and when I run the post-estimation command…
Change in the default bandwidth of -lpoly- from Stata 15/16 to 17Hello Stata and Statalisters, The default bandwidth of -lpoly- appears to have changed from Stata 1…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse data
Post a Comment