Hi All,
I have got a data set with each row indicating a household technology installed in a location each year and over the years. I want to convert the data to panel data, by collapsing the various variables into the relevant single value/variable such as the number of technologies installed in a location for a particular year. This would involve counting each row. I believe we could also get summary values for other variables such as total subsidies provided in a location for a particular year by adding the subsidy amount across the rows for that year. My data is arranged as below.
. . dataex id vdcname fiscal_year1 basesubsidy size_code in 1/20
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Listed 20 out of 368945 observations
I would be thankful for any help.
Samir
I have got a data set with each row indicating a household technology installed in a location each year and over the years. I want to convert the data to panel data, by collapsing the various variables into the relevant single value/variable such as the number of technologies installed in a location for a particular year. This would involve counting each row. I believe we could also get summary values for other variables such as total subsidies provided in a location for a particular year by adding the subsidy amount across the rows for that year. My data is arranged as below.
. . dataex id vdcname fiscal_year1 basesubsidy size_code in 1/20
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float id long vdcname float fiscal_year1 long basesubsidy byte size_code 199096 1388 2013 35000 6 199093 1388 2006 9500 6 199094 1388 2013 35000 6 199095 1388 2013 35000 6 343760 2538 2006 9500 6 343763 2538 2013 35000 6 343764 2538 2013 35000 6 343765 2538 2013 35000 6 343761 2538 2007 9500 6 343762 2538 2013 35000 6 351035 2607 2007 9500 6 351036 2607 2007 9500 6 248427 1746 2012 35000 6 248430 1746 2013 35000 6 248426 1746 2012 35000 6 248431 1746 2013 35000 6 248432 1746 2013 35000 6 248428 1746 2012 35000 6 248429 1746 2013 35000 6 22546 38 2012 35000 6 end label values vdcname vdcname label def vdcname 38 "Ambegudin", modify label def vdcname 1388 "Khewang", modify label def vdcname 1746 "Mehel", modify label def vdcname 2538 "Surumakhim", modify label def vdcname 2607 "Tel Lok", modify
Listed 20 out of 368945 observations
I would be thankful for any help.
Samir
Comment