I have a dataset that has the financial data recorded monthwise over a span of a few months. Let's say each enterprise has 3 months of financial data recorded, but the data collection isn't necessarily uniform i.e for some enterprises, data can be of Jan-Feb-Mar, for some it can be Mar-Apr-May
For the months where no data was recorded, the data entry is marked by '0'
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int ID byte(sales_Jan cost_Jan tax_Jan misc_Jan sales_Feb cost_Feb tax_Feb misc_Feb sales_Mar cost_Mar tax_Mar misc_Mar sales_Apr cost_Apr tax_Apr misc_Apr) 1234 0 0 0 0 0 0 0 0 20 10 30 40 60 70 10 20 3456 0 0 0 0 25 30 45 20 20 45 20 20 20 30 40 20 2345 0 0 0 0 0 0 0 0 40 10 20 10 20 40 10 20 4569 50 60 70 10 20 20 30 40 90 10 20 10 0 0 0 0 7896 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1235 0 0 0 0 40 60 20 40 20 90 20 10 50 20 50 20 6954 0 0 0 0 0 0 0 0 0 0 0 0 50 80 20 60 1254 0 0 0 0 0 0 0 0 0 0 0 0 40 20 40 40 end
Is this possible?
0 Response to Data spanning across different time period - how to convert it into common variables?
Post a Comment